2017-04-24 23 views
1

記録できるフォークpyttsxが見つかりました。pyttsx:一度記録を停止する

engine =pyttsx.init() 
voices = engine.getProperty('voices') 
engine.setProperty('voice', voices[0].id) #change index to change voices 
engine.rec('test this out','test.wav') 

問題はあるが...私はシェルを閉じずにファイルを開くことができません。https://github.com/hick/pyttsx/tree/master/pyttsx

は、ここに私のコードです。しかし、私はmp3にエンコードするなど、より多くのコードを実行する必要があります。

私はすでにengine.stop()を試しました。そして、私はここを見て:https://github.com/hick/pyttsx/blob/master/pyttsx/engine.py ...

+0

は、新しい端末またはウィンドウを開くことができます。 – Shiping

答えて

0

使用pyttsx3代わりpyttsxの

import pyttsx3 

engine = pyttsx3.init() 
engine.say('Nice to meet you') 
engine.runAndWait() 
関連する問題