Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Google SSML #12

Open
rikhuijzer opened this issue Feb 25, 2025 · 0 comments
Open

Support Google SSML #12

rikhuijzer opened this issue Feb 25, 2025 · 0 comments

Comments

@rikhuijzer
Copy link
Collaborator

Google supports the Speech Synthesis Markup Language (SSML) which allows for more control over the audio.
For example, you can add pauses or emphasis to the audio:

<speak>
    This is an <say-as interpret-as="characters">SSML</say-as> example with a pause.
    <break time="3s"/>.
</speak>

But this needs to be sent correctly to the API:

"{
    'input':{
     'ssml':'<speak>The <say-as interpret-as=\"characters\">SSML</say-as>
          standard <break time=\"1s\"/>is defined by the
          <sub alias=\"World Wide Web Consortium\">W3C</sub>.</speak>'
    },
    'voice':{
      'languageCode':'en-us',
      'name':'en-US-Standard-B',
      'ssmlGender':'MALE'
    },
    'audioConfig':{
      'audioEncoding':'MP3'
    }
  }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant