SillyTavern / Extension-Speech-Recognition

Convert your speech to text using browser or extras.
GNU General Public License v3.0
4 stars 12 forks source link

[BUG] Speech recognition not starting #9

Open ZhenyaPav opened 2 months ago

ZhenyaPav commented 2 months ago

When pressing the hotkey or the button in the web ui, nothing is sent to the backend (koboldcpp, haven't tested with anything else). This fork works fine.

I saw this in the browser console:

Uncaught (in promise) DOMException: AudioContext.createMediaStreamSource: Connecting AudioNodes from AudioContexts with different sample-rate is currently not supported.
    onSuccess http://localhost:8000/scripts/extensions/third-party/Extension-Speech-Recognition/index.js:212
    promise callback*loadNavigatorAudioRecording http://localhost:8000/scripts/extensions/third-party/Extension-Speech-Recognition/index.js:281
    loadSttProvider http://localhost:8000/scripts/extensions/third-party/Extension-Speech-Recognition/index.js:340
    <anonymous> http://localhost:8000/scripts/extensions/third-party/Extension-Speech-Recognition/index.js:853
    jQuery 9
        e
        t
        setTimeout handler*Deferred/then/l/<
        c
        add
        then
        Deferred
        then
        ready
    <anonymous> http://localhost:8000/scripts/extensions/third-party/Extension-Speech-Recognition/index.js:679
ZhenyaPav commented 2 months ago

Don't know much about how audio capture works, but I think it may be related to const audioContext = new AudioContext(); being created without the sampleRate in the fork