Reply to post

Support for SSML?

Author
woole123
User
  • Total Posts : 0
  • Reward points: 0
  • Joined: 2018/11/21 13:10:39
  • Status: offline
2018/11/22 01:46:04 (permalink)

Support for SSML?

Hiya new user here, I notice in the list of FAQ type threads, there is mentioned of SSML and it working at least partly, voice dependent? However I'm finding no real way to make it function with any voices I can find?
 
I've tried a few tags like..
 
<emphasis> tags, the voice reads the text, however the tag has no effect at all
<prosody> tags, I tried changing pitch via this (what I mainly wanted to try was pitch being alterable within the text rather than X value for everything) but the voice will not read the text within the tags any more. I tried both <prosody pitch="+X%"></prosody> and <prosody pitch="-/+Xst"> </prosody>.
 
The only tag which seems to do something is <break> where you can set say a 500ms delay.
 
I also notice if you type out any SSML tags they are invisible in the paragraph of text and when you then go to edit the text, much of the time you can't see them any more, but they do exist as almost hidden characters (if you delete all the text between where you placed them, the app seems to acknowledge there is some hidden remaining text as it shows a random ".." rather than what it looks like when you clear all text.
 
Just wondering if the lack of SSML support for these tags is more of an android issue? As I notice if I search SSML and android very little comes back.
 
cheers.

10 Replies Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Support for SSML? 2018/11/22 08:13:30 (permalink)
    Which SSML tags are supported and how depends only on the TTS voice you use. I cannot do anything else, except passing text to TTS engine, and including the tags as needed. The <break> is the most common SSML tag supported by different voices, but not all of them.
    Also, how do you enter the SSML tags. Through the "Edit text" function on the main menu? This may not work well, I would need test the issues here some more. The way I used them so far was with "Edit speech" feature on the Settings menu, e.g. if you want a 500 ms pause on each comma, do a replacement:
     
    Replacement kind: Case sensitive     (this does not matter much here, except that this is the fastest)
    Pattern: ,
    Replace: ,<break time="500ms"/>
     
    Greg
    woole123
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2018/11/21 13:10:39
    • Status: offline
    Re: Support for SSML? 2018/11/22 12:33:41 (permalink)
    ah I see fair enough, well I tried with a few voices I had, Samsung and Google's offerings, then one from CereProc and an apk I found for an old IVONA voice.
     
    Yeah I was doing edit text, tried edit speech the emphasis and prosody tags still have the same effect on the voices I have (emphasis does nothing, voices refuse to speak any text with prosody tags)
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Support for SSML? 2018/11/22 15:25:06 (permalink)
    Yes, standard is one thing, the actual implementations - another. However the voices should still speak correctly with SSML tags embedded, even if they don't handle them. They would stop speaking only if the tag coding was incorrect. I maybe could point errors if you gave me concrete examples of what exactly you did and where.
    woole123
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2018/11/21 13:10:39
    • Status: offline
    Re: Support for SSML? 2018/11/23 12:37:12 (permalink)
    Yeah fair enough, I was trying simple text sentences. I was unsure in what format it would want a prosody pitch change, Amazon's TTS does percentages, Google does stages, so I tried both..
     
    So say with a Google voice I'd try...<prosody pitch="+20%">Hello there</prosody> or <prosody pitch="+2st">Hello there</prosody>. In both cases that would cause the voice to not speak those words, if I did normal words around it.
     
    Say. Hello there, <prosody pitch="+20%">how are you?</prosody>, that's good.
     
    The voice refuses to say any of this text. This is the same either if I write the SSML via edit text or if I use symbols and make edit speech transform it into those.
     
    AH! Just edited this, didn't think to test them but there are the voices which require internet connection. These do the tags correctly and weirdly enough without changing anything, now the offline ones at least try to pronounce the words within the tags though it has no effect, if the wifi is on...so odd.
     
    It might be no offline voices can handle them right, or at least none I've found.
     
    What happens with the online voices, do they send the text elsewhere then return it?
    post edited by woole123 - 2018/11/23 12:46:53
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Support for SSML? 2018/11/29 13:54:54 (permalink)
    The online voices, currently only in Google TTS set I believe, send text of each sentence (actually, what @Voice highlights in yellow) to the Google server, and receive back "wave" data used to emit sound. How exactly they work, and which SSML tags they handle or not, I cannot say. They are products of Google company, not mine.
     
    I tested a sentence like:
     
    Just a test: <prosody pitch="+20%">Hello there</prosody>! test end.
     
    with Google local voice it said everything, but without any changes in pitch. However, entering tags like this through the "Edit text" function on @Voice menu does not work correctly, one must do such things through "Edit speech".
     
    Greg
    reyanoo
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2018/10/18 09:58:47
    • Status: offline
    Re: Support for SSML? 2018/12/12 15:19:06 (permalink)
    Ohhh.. this is the good stuff.
    ok guys please help me out here.. 
     
    this example:
    Admin
    Just a test: <prosody pitch="+20%">Hello there</prosody>! test end.

    worked for me 
     
    My question is how do we apply the same example so that the changes apply to any text or sentences that are placed in between "Quotes"??
    <prosody pitch="+20%">What should i put here?</prosody>
     
    Maybe something like this:
    <prosody pitch="+20%">"*"</prosody>
     i have no idea what am doing.. sorry.
     
    Please Help,
    Thanks.
    Reyan
    post edited by reyanoo - 2018/12/12 16:13:03
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Support for SSML? 2018/12/14 16:50:00 (permalink)
    It would be possible with the "Edit speech" function on the Settings menu of @Voice, but first you would have to consider which double-quotes characters are used in the text you are listening to, as there are several different double-quote characters available in the Unicode standard. There is the most common " that you can type directly from the keyboard (on a big US English keyboard it is just to the left of Enter key), and it's the same for opening and closing quotation mark.
     
    There are other, some have opening quotation at the lower letter line and closing and the upper, others just look differently, maybe the opening double-quote character is slanted from left to right, and closing the other way, etc. If the quotation marks for opening and closing are different, it's easier to replace them with correct "prosody" code. If they are the same, it's more problematic.
     
    Another complication is that @Voice speech replacements work only within one sentence scope. So the "prosody" would work if the opening and closing quotation are within the same sentence, but not otherwise. I would have to redo this feature, maybe to work on whole paragraphs of text or something, to work correctly in more cases.
     
    Here is a sample replacement for the regular double quote character " that can be typed directly from keyboard, same for opening and closing:
     
    - Open @Voice Settings menu - press Edit speech
    - press the [+] button on top to add new replacement
    - enter the following:
     
    Type: Regular Expression (RegEx)
    Pattern: "(.+?)("|$)
    Replace: <prosody pitch="+20%">$0</prosody>
     
    - hide keyboard and press Save, go back to text and test. Note that this will work only for TTS voices that support SSML and its "prosody" command.
     
    Greg3
    reyanoo
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2018/10/18 09:58:47
    • Status: offline
    Re: Support for SSML? 2018/12/14 21:34:20 (permalink)
    Hi Greg,
     
    You were right, It worked after i made sure that the Quotes match the ones used in the current book by copying them from the the book and not typing them myself.
     
    Thanks man.. that helps a lot.
    Reyan
    woole123
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2018/11/21 13:10:39
    • Status: offline
    Re: Support for SSML? 2019/03/12 11:32:21 (permalink)
    Little bump to this. It was all working fine for me via edit speech, but suddenly Google's online voices are ignoring the SSML. However it seemed to happen with the last update to this software, not Google's voices last update (looking at the latest updates for both). The voices just don't pronounce the SSML at all at the moment, so lets say you had "hi there" and changed the pitch up for another "hi there", they'd just say it at the same pitch. Whereas the offline ones do pronounce prosody pitch= etc or they won't say the words at all between the tags.
     
    Tried re-installing. clearing cache, getting Google voices again etc. Odd...
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Support for SSML? 2019/03/12 14:45:24 (permalink)
    Nothing has changed in @Voice app. It is passing the SSML tags correctly to the selected speech engine. What the TTS engine does with the tags is beyond my control. If the voices say the SSML tags literally, then something must be wrong with the original text source that contains them, or the speech replacements you have defined. I just tested this by entering a speech replacement including prosody pitch for some phrase. Tested that the correct tags are passed from @Voice to Google TTS engine, but it ignores them, speaks at the same pitch. Guess they decided to ditch support for some (or all?) SSML tags, please complain to Google about it...
     
    Greg
    Jump to:
    © 2024 APG vNext Commercial Version 5.1