Skip to content

feat: Personalize / adapt / change the endSilenceTimeoutMs mid-session #13

@nfreear

Description

@nfreear

Dispatch and handle a custom setTimeout event ... recreate the internal speech recognizer in mid-session ...

Dispatch setTimeout event

    const timeoutEvent = new Event('recognition:set_timeout');
    timeoutEvent.data = { endSilenceTimeoutMs, text };

    window.dispatchEvent(timeoutEvent);

Recreate speech recognizer

    PRIV.resetRecognizer = async () => {
          if (PRIV.setTimeoutEvent) {
            // ...

            const { recognizer, OPT } = await createRecognizer(resetOpt);

            // ...
          }
    };

See :~ compulim/web-speech-cognitive-services@038dccb ~ recognizer.dispose() ~ 05-Dec-2018;

..

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions