mediatechlab / tts-wrapper

TTS-Wrapper makes it easier to use text-to-speech APIs by providing a unified and easy-to-use interface.
MIT License
14 stars 9 forks source link

Playing sound immediatley rather than saving to wav #21

Open willwade opened 1 year ago

willwade commented 1 year ago

Description

We can currently create a wav or mp3 with tts.synth - but I'd like to have a tts.speak command

So something that just does the same but instead of saving an audio file just streams out the binary data. We can kind of do this with

        from playsound import playsound
        playsound('mysound.wav')

but 1) thats another library - and 2) its still having to do a save and then read..

Thanks for the great project :)

willwade commented 1 year ago

Prolly wise to use mixer http://www.pygame.org/docs/ref/mixer.html

willwade commented 3 months ago

fixed in #25 - we now use pyaudio in the abstract class. We have speak() and speak_streamed() that can use this..