my problem starts here:
pyttsx and gTTS module errors
gTTS works well, takes text from text file, but first creates mp3 file, then if I want listen, I must call
with pygame I have installation problem and not sure, how good is use it this way:
Can you provide more details about the pygame installation error?
I was able to use PYGAME with this code, where "hello.mp3" is a file in the same directory
from gtts import gTTS
tts = gTTS(text='Hello', lang='en')
tts.save("hello.mp3")
from Tkinter import *
root = Tk()
from pygame import mixer
mixer.init()
mixer.music.load('hello.mp3')
mixer.music.play()
root.mainloop()
vlc just how to install it?
I also used VLC. I have installed it with these commands:
sudo pip install python-vlc
And I got this error:
NameError: no function 'libvlc_new
So, I tryed the command:
sudo apt-get install vlc
And it worked with this code:
from gtts import gTTS
tts = gTTS(text='Hello', lang='en')
tts.save("hello.mp3")
from Tkinter import *
root = Tk()
import vlc
p = vlc.MediaPlayer("hello.mp3")
p.play()
root.mainloop()
Hope It help You.