0

I'm using python to execute a subprocess like so:

subprocess.call(["espeak", "-v Ivona 2 Joey -w "+file_name+".wav", text])

I'm not sure how to use the Ivona 2 Joey voice. When I run the TTSApp.exe file, I can see it in the drop down under "Voice".

and I have read through this http://espeak.sourceforge.net/voices.html.

and when I do espeak --voices, I don't see Ivona in there.

Or is there another way to do it? I have tried pyttsx but it has no output to wav.

All I'm trying to do is use a voice synthesizer to read text using Ivona voice and output to a wav file.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
jason
  • 3,811
  • 18
  • 92
  • 147
  • Related http://stackoverflow.com/questions/9900137/recording-synthesized-text-to-speech-to-a-file-in-python http://stackoverflow.com/questions/17646949/how-to-save-sound-produced-from-text-as-mp3-or-wave-in-python http://stackoverflow.com/questions/39014468/how-to-save-the-output-of-pyttsx-to-wav-file – Nikolay Shmyrev Apr 19 '17 at 07:41

1 Answers1

0

Joey is voice of Ivona TTS, a commercial product. The voice is available through SAPI interface. You can not access this voice through espeak, espeak only supports espeak voices.

You can use more advanced SAPI wrapper to save output to the wav file. For example you can try

https://github.com/DeepHorizons/tts

The code should look like this:

import tts.sapi
voice = tts.sapi.Sapi()
voice.set_voice("Joey")
voice.create_recording('hello.wav', "Hello")
Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
  • I'm having problems running code in python 2.7.13, i'm getting a `TypeError: super() takes at least 1 argument (0 given)` error. – jason Apr 24 '17 at 00:22
  • You can remove the line `super().__init__()` from the sapi.py. – Nikolay Shmyrev Apr 24 '17 at 07:21
  • I deleted the line. now getting this `File "C:\Python27\lib\site-packages\tts\sapi.py", line 97, in _create_stream stream.Open(filename, SpeechLib.SSFMCreateForWrite) COMError: (-2147287038, None, (None, None, None, 0, None))` – jason Apr 24 '17 at 11:45