speak.js icon indicating copy to clipboard operation
speak.js copied to clipboard

phoneme input/output

Open forresto opened this issue 13 years ago • 4 comments

Now that I have been playing with it for a bit it would be fun to get the phonemes with -x to see how the input is getting parsed.

[[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] as input already works, and it is fun to hack with the phonemes.

forresto avatar Jan 17 '12 11:01 forresto

Is -x something that espeak recognizes? How does it work?

kripken avatar Jan 22 '12 03:01 kripken

I'm guessing that -x -q outputs something like [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] which you could then alter and reinput with -w.

http://espeak.sourceforge.net/commands.html

-q Quiet. No sound is generated. This may be useful with options such as -x and --pho.

-w Writes the speech output to a file in WAV format, rather than speaking it.

-x The phoneme mnemonics, into which the input text is translated, are written to stdout.

-X As -x, but in addition, details are shown of the pronunciation rule and dictionary list lookup. This can be useful to see why a certain pronunciation is being produced. Each matching pronunciation rule is listed, together with its score, the highest scoring rule being used in the translation. "Found:" indicates the word was found in the dictionary lookup list, and "Flags:" means the word was found with only properties and not a pronunciation. You can see when a word has been retranslated after removing a prefix or suffix.

forresto avatar Jan 22 '12 08:01 forresto

Nice, we should definitely do this.

kripken avatar Feb 19 '12 18:02 kripken

Hi ! Did you do it in the end ? espeak -x -q works great for what I need, but it would be much cooler to do it in the browser ! there is also espeak --ipa which outputs international phonetic alphabet. I must admit I'm lost : don't understand emscripten, and i don't understand whether speak.js allows this already, or if there is an easy way to modify and rebuild it to get access to the phoneme representation, or if it is hopeless.

thomas-picchetti avatar Mar 17 '21 19:03 thomas-picchetti