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 ...
は、新しい端末またはウィンドウを開くことができます。 – Shiping