how to play mp3

前端 未结 12 1660
醉酒成梦
醉酒成梦 2021-02-09 09:39

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

12条回答
  •  暖寄归人
    2021-02-09 10:13

    install pyglet using python -m pip install pyglet

    Download installed here Link to AVbin setup ( it's a must )

    32/64 bit

    import pyglet
    
    song = pyglet.media.load('file.mp3')
    song.play()
    pyglet.app.run()
    

    That's all.

提交回复
热议问题