Open ericECmorlaix opened 4 years ago
I've added it to the list.
In the meantime, the shell command "say" is available and seems to work in my tests.
Try !say Hello world
.
You can change the voice with !say -v
, for example !say -v Thomas Bonjour, monde
for a french speaking voice (or !say -v Amélie Bonjour, monde
).
So, pyttsx3 depends on Mac-specific libraries; porting it to iOS would require too much work.
Hello Eric
You can also pass your python variables to shell like this :
a = "Hello"
!say $a
b = "You"
!say $b
Another solution is to use the module gTTS
(Google Text To Speech), but it saves the audio into a file (mp3).
%pip install gTTS
from gtts import gTTS
tts = gTTS('bonjour', lang='fr')
tts.save('hello.mp3')
from IPython.display import Audio
Audio('hello.mp3', autoplay=True)
But autoplay=True
doesn't work for me.
Is there a solution to play it directly ... in python or in shell ?
NLG
Hello It would be fun to have pyttsx3 or any other usefull way for TTS... Thanks