grigi / talkey

Simple Text-To-Speech (TTS) interface library with multi-language and multi-engine support.
MIT License
24 stars 4 forks source link

Featurerequest: "stop" that stops the speech #4

Open chrys87 opened 7 years ago

chrys87 commented 7 years ago

Howdy,

i m currently writing an console screenreader and want to make a speech driver based on your amazing speech framework. to make this real i would need a "stop" function to interrupt speech. could that be done?

grigi commented 7 years ago

Hi

Currently it blocks on playing the audio, so by interrupting that, it should stop it?

On linux a HUP to the aplay instance should do it. The question is, how do you plan to send it a "stop" command if it blocks?

Could you tell me more about what you are doing?

chrys87 commented 7 years ago

Howdy,

about the blocking problem. i would start "say" in an thread for example. maybe we also can add an non blocking say call as well :). i have an "generic" speech driver for my screen reader that is basically using sub-processing. you can find it here if you are interested in: https://raw.githubusercontent.com/chrys87/fenrir/master/src/fenrir/speechDriver/genericDriver.py currently i have an speech-dispatcher, an espeak and the generic back end. i also want to add a back end using your awesome bindings to increase the number of possibility's and TTS Engines.