Skip to content

PythonSDK async mechanism of TTS & STT : is async achieved by multi-threading or multi-processing? #2926

@ANYMS-A

Description

@ANYMS-A

I'd like to know that for python sdk's async TTS or async STT, is the callback fucntion task be executed by a sub-thread or a sub-process? (e.g. .speak_async( ), .start_continuous_recognition_async() methods of SpeechSynthesizer and SpeechRecognizer class)
Usually, I will try to collect the output of the task in the callback function like

recognizer.recognizing.connect(collect_data_callback_function)
recognizer.recognized.connect(collect_data_callback_function)

Are those callback functions executed in the sub-thread?

I ask this is because the GIL limitation in python: if I execute some thread-blocking operation in my main-thread, will it block the execution of the callback function? If it will, I might need to consider the move those operation to a sub-process for execution

Metadata

Metadata

Assignees

No one assigned

    Labels

    update neededFor items that are in progress but have not been updated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions