dongye3917 2019-05-14 23:42
浏览 75

Google Cloud TTS引擎忽略大块文本上的中断SSML标记

I'm trying to generate audio from a big paragraph, but Google is ignoring the SSML tags.

The tags are respected if I trim the text to around three lines, but more than that makes them invisible.

$body = [
  'input' => [
    'ssml' => '<speak><p>Client Acquisition Engine Funnel For Creative Professionals</p><break time="3000ms"/><p>Most creative professionals I know are great at what they do, they have happy customers and deliver a high standard of work. Most however aren\'t very adept at acquiring new clients and have fallen into the habit of relying too much on referrals.</p><break time="3000ms"/><p>I\'ll be honest here, I used to do that as well.</p><break time="3000ms"/><p>For a long time, I just thought: "Well, if keep turning out good work I\'ll keep getting referrals"?</p><break time="3000ms"/><p>Turns out, that\'s not the case at all. Relying on referrals is a highly risky \'strategy\' and is not recommended (I wrote about it here).</p><break time="3000ms"/><p>Deep down somewhere in your conscious you already know this and so every now and then you throw some money into Facebook & Google Ads and after burning through a fair amount cash and bearing little fruit, decide its not for you and carry on.</p><break time="3000ms"/><p>Also, relying on the 20% of your clients who bring in 80% of your revenue (those 1 or 2 hero long term clients who\'ve helped sustain your freelance business for years) is also a highly risky situation to be in. You wake in the middle of the night, every now and then, in a cold sweat.. they\'ve left you!</p><break time="3000ms"/><p>Phew! It was only a dream...</p><break time="3000ms"/><p>I was exactly like that, but then I started to develop and systemise my sales & marketing processes. So that would be able to build a predictable lead flow, attracting more ideal prospects, delivering value, pre-qualifying leads, inviting those with highest engagement to book time on my calendar, all the while automating 80% of that process.</p><break time="3000ms"/><p>The key is to understand your own sales process, breaking each of the stages down into steps and look to automating as much of the repetitive tasks as you can. Doing so will result in being able to attract and manage more leads, filter out the ideal customers, which in turn gives you me more time, money and freedom.</p><break time="3000ms"/><p>Sounds complicated, and if you don\'t have a clear pathway, it can quickly end up turning into a rabbit hole.</p><break time="3000ms"/><p>But you can stop faffing about and get on the right track by downloading the Client Acquisition Engine Funnel Map & Toolkit today.</p><break time="3000ms"/></speak>',
  ],
  'voice' => ['language_code' => 'en-US', 'name' => 'en-US-Wavenet-D'],
  'audioConfig' => ['audio_encoding' => 'MP3'],
];

$result = json_decode($client->post('https://texttospeech.googleapis.com/v1beta1/text:synthesize?key=[REDACTED]', $body)->getBody());

file_put_contents('test.mp3', base64_decode($result['audioContent']));

The request goes through successfully, but the break tags are missing. This is not only reproducible via code, but also on their public playground on the service website.

  • 写回答

1条回答 默认 最新

  • douzen3516 2019-05-16 19:54
    关注

    Please open an Issue Tracker,if you believe it is a bug so the Text-to-Speech Systems Engineers can fix the issue with the SSML tags that you're experiencing.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题