@@ -461,20 +461,21 @@ def speak(text):
461461 # Use appropriate encoding for Asian languages
462462 encoding = LANG_ENCODINGS .get (_current_lang , "mbcs" )
463463 text_bytes = text .encode (encoding , errors = "replace" )
464- _client .send_command ("addText" , text = text_bytes )
464+ _client .send_command ("addText" , text = text_bytes , wait = False )
465465 except Exception :
466466 LOGGER .exception ("Failed to send text to synthesizer" )
467467
468468
469469def index (idx ):
470470 try :
471- _client .send_command ("insertIndex" , value = int (idx ))
471+ _client .send_command ("insertIndex" , value = int (idx ), wait = False )
472472 except Exception :
473473 LOGGER .exception ("Failed to insert index" )
474474
475475
476476def cmdProsody (pr , multiplier , offset = 0 ):
477- """Apply a prosody change using the current base value from voice_params.
477+ """
478+ Apply a prosody change using the current base value from voice_params.
478479
479480 Called at synthesis time so voice_params[pr] reflects the latest base.
480481 Computes: value = base * multiplier + offset
@@ -552,8 +553,8 @@ def getVParam(pr):
552553def setVParam (pr , vl , temporary = False ):
553554 try :
554555 response = _client .send_command (
555- "setVoiceParam" , paramId = int (pr ), value = int (vl ), temporary = bool (temporary )
556- )
556+ "setVoiceParam" , paramId = int (pr ), value = int (vl ), temporary = bool (temporary ),
557+ wait = False )
557558 if not temporary :
558559 voice_params [pr ] = response .get ("voiceParams" , {}).get (pr , vl )
559560 except Exception :
0 commit comments