guest271314 / SpeechSynthesisRecorder

Get audio output from window.speechSynthesis.speak() call as ArrayBuffer, AudioBuffer, Blob, MediaSource, MediaStream, ReadableStream, other object or data types
82 stars 19 forks source link

Saving audio w/o using speaker and microphone #10

Closed The-Gupta closed 6 years ago

The-Gupta commented 6 years ago

@guest271314 I don't understand the JS code well. Is there an easy way to save the output audio file without first playing and then recording? Also, is there a python wrapper around this library that I could not find?

guest271314 commented 6 years ago

@The-Gupta You can use a local server or Native Messaging to post plain text or SSML to espeak, espeak-ng, or other speech synthesis binary, then return the response as a data URL, see https://stackoverflow.com/q/48219981.

The code at this repository is written in JavaScript.

guest271314 commented 6 years ago

See also https://freebsoft.org/doc/speechd/speech-dispatcher.html#Python-API