Reply to post

Hot![FAQ]Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice

Author
Admin
Administrator
  • Total Posts : 275
  • Reward points: 0
  • Joined: 2010/11/22 00:00:00
  • Location: USA
  • Status: offline
2016/02/16 14:27:46 (permalink)

Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice

You can read about SSML markup here:
 
                https://www.w3.org/TR/speech-synthesis11/
 
You could try to insert any SSML tags into sentences and most voices should understand and interpret them correctly. How they actually interpret tags is up to the voice software implementation, I have no influence on this. @Voice will automatically wrap sentences sent to TTS engine into <speak>…</speak> tags, so don’t add these manually.
 
To add speech replacements in @Voice app, open the Settings menu, press "Edit speech", then use the + button to add a new speech replacement.
 
Example: The following speech replacement will add a 500 ms pause after each comma:
 
Replacement Kind:    Case sensitive
Pattern:    ,
Replace:    ,<break time=”500ms”/>

 
 Another example, this one will add 1 second pause after each word:
 
Replacement Kind:    RegEx
Pattern:    \b\w+\b
Replace:    $0<break time=”1s”/>
 
To edit pronunciation of words you could use SSML <phoneme …> element with IPA or other phonetic alphabets (depending on what the voice in use actually supports, e.g.:
 
Replacement Kind:    Case Insensitive
Pattern:    psychology
Replace:    <phoneme alphabet="ipa" ph="saɪˈkɒlədʒɪ"/>
 
Note, after further tests I found out that only the IVONA TTS and Android demo voices named Pico support phonetic transcription, at least with IPA alphabet. Further tests are needed to see if any other commercial voices on Android support phonetic alphabets or not.
 
Greg
post edited by Admin - 2020/04/25 15:50:02

5 Replies Related Threads

    DukeArchibald
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2020/01/27 19:00:59
    • Status: offline
    Re: Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice 2020/04/16 09:23:57 (permalink)
    I would like to change the full voice while reading without having to change it manually (i'm doing dialogue)
    (example from en-gb-x-rjs#male_1-local to en-gb-x-rjs#female_1-local)
    if it's possible is there a way to do that inside the html file ?
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice 2020/04/16 11:44:55 (permalink)
    Currently I don't have this ability. I could consider it, if more users asked for such a feature. However, it would be very difficult (most probably impossible) to determine automatically which voice should be used, and probably very few people would be interested in manually annotating text to switch voices in a way that would make sense.
    DukeArchibald
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2020/01/27 19:00:59
    • Status: offline
    Re: Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice 2020/04/16 21:09:14 (permalink)
    thanks for the quick response
    2 more question:
     
    I need to have numbers formated like this #-## for example 0-08 or 2-28 be read as zero-zero-eight or two-twenty eight, how should I do that ? I tried <say-as number:cardinal>0-08</say-as> and <say-as number:ordinal>0-08</say-as> but both gave me zero-oh-eight
    and I don't really know were to put this one: for the text to speech saving file, can we have an option to save the filename as the table of content chapter name
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice 2020/04/17 05:14:07 (permalink)
    I really don't know which TTS voices support say-as SSML tag. I tried here Google TTS voices, and they would not make any sound if I embedded say-as tag you specified. Weather a TTS engine says "oh" or "zero" depends only on that TTS engine code, not @Voice app. In @Voice speech replacements you would have to substitute 0 number with "zero" word to make sure any engine says "zero" there. If you want to hear the word "zero" for each 0 that appears at the beginning of number, you could use RegEx replacement like:
     
    Type: RegEx
    Pattern: \b0(\d*)
    Replace: zero $1
     
    If you wanted a group of two zeroes at the start of number said as "zero zero", you would have to add this replacement _before_ the one listed above:
     
    Type: RegEx
    Pattern: \b00(\d*)
    Replace: zero zero $1
     
    etc., for example if you wanted three zeroes replaced that way, again on the replacement list before them should be "\b000(\d*)" and "zero zero zero $1"
    DukeArchibald
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2020/01/27 19:00:59
    • Status: offline
    Re: Using SSML (Speech Synthesis Markup Language) to edit speech in @Voice 2020/04/17 07:18:56 (permalink)
    ok, thank you for the regex support :)
    Jump to:
    © 2020 APG vNext Commercial Version 5.1