Menu

#102 SSML, xml:lang & name property does nothing on voice, speak

open
None
5
2013-05-25
2013-05-24
No

I was trying to create an SSML document. I could not get the voice to change from the default "en" to "en-us" or any other language.

I tried specifying xml:lang="en-us", xml:lang="en-US", xml:lang="english-us", and xml:lang="english-US" on the speak tag, the voice tag, and then I tried it on both tags at the same time. I tried using the values listed above on the name property of the voice tag, both in conjunction with the xml:lang property on the voice tag and without the xml:lang property on the voice tag. Nothing worked. I could set other parameters like gender and variant, and the voice would change but I couldn't get espeak to pronounce words any other way except the default.

Discussion

  • Matthew Kastor

    Matthew Kastor - 2013-05-24
    • summary: SSML, xml:lang does nothing --> SSML, xml:lang & name property does nothing on voice, speak
     
  • Matthew Kastor

    Matthew Kastor - 2013-05-25

    Batch file for listening to SSML file in same directory with eSpeak available on PATH

     
  • Matthew Kastor

    Matthew Kastor - 2013-05-25

    SSML file example

     
  • Matthew Kastor

    Matthew Kastor - 2013-05-25

    Added SSML file. Added BAT file.
    If espeak.exe is available on the path then you should be able to drag and drop the SSML file onto the batch file to hear it. The batch file and the SSML file must be in the same directory.

    I can't figure out how to specify the en-us voice in an SSML file. It appears to me that there is a bug in espeak but, I've attached these files for review in case I'm doing it wrong.

    I'm runnin espeak on Windows 7 64 bit, if that matters.

     
  • Jonathan Duddington

    The reason for this is the atribute: variant="7". eSpeak is choosing a British English voice as a variant of the original "en-us" voice. If you change the variant number to 4 or lower then it uses a "en-us" voice. The female voice, which has variant="3" speaks with US pronunciation.

    You can change this by adding a line:

    variants 6

    to the voice file "espeak-data/voices/en-us". This will allow 6 variants (numbers "2" to "7". number "1" is the standard en-us voice) of the en-us voice before it chooses another English voice as a variant.

     
  • Jonathan Duddington

    • assigned_to: nobody --> jonsd
     
  • Matthew Kastor

    Matthew Kastor - 2013-05-27

    I'm confused now. I thought the variant attribute applied one of the filters from espeak-data/voices/!v I didn't really understand how I would apply klatt or croak but I was under the impression that if I picked gender="female" and variant="3" then it would be like using en-us+f3 on the command line.

    I tried adding a line "variants 6" to the en-us file and it appeared to work however, doing that causes some error message to show up saying "Bad attribute: variants". I looked in the "en" file and didn't see a variants line.

    I guess I'm really just confused about how the command line options map to the attributes in SSML. I've had some success with guessing but it would help if there were a bit more documentation at http://espeak.sourceforge.net/ssml.html possibly adding a short note beside the supported attribute's name to explain it's similarity or difference with whatever command line option it falls in line with.

     

Log in to post a comment.