[GH-ISSUE #19727] issue: Web API Speech to Text triggers a false timeout #34498

Open
opened 2026-04-25 08:30:42 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jpetersen6202 on GitHub (Dec 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19727

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.6.41

Ollama Version (if applicable)

No response

Operating System

Windows 10

Browser (if applicable)

Chrome 142.0

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

After clicking the "dictate" microphone button on the "new chat" page, while using the Web API speech-to-text engine, the user should be able to speak with natural pauses for breath etc without the voice activity timeout firing, cutting off the voice recording.

Image

Actual Behavior

After clicking the "dictate" microphone button on the "new chat" page, the recording seems to cut off the user / speaker at random, in the middle of a sentence.

Steps to Reproduce

This issue exists in the front-end UI code, so general build and environment variables should not matter. Personally, I cloned the repo (OpenWebUI v0.6.41) and am running on Windows 10. (exact issue pointed out in lower sections)

  1. Navigate to the admin panel, click the settings tab, and select "Audio" from the side bar.
  2. Ensure that your "Speech-to-Text" engine is set to "Web API"
  3. Navigate to home / new chat page
  4. Click the "dictate" button (mic icon) and begin speaking.
  5. Take an intentional gap in your speaking for a breath, then continue speaking for at least two seconds without stopping again.
  6. You will notice that during your second 'batch' of words, the recording will abruptly stop, cutting you off.

Logs & Screenshots

No relevant logs or errors, as the code is technically operating as designed. I've instead included the code segment causing the issue with explanation.
VoiceRecording.svelte | line 274

If using web stt engine, inactivity timeout is set to 2 seconds
const inactivityTimeout = 2000;

then below, speechRecognition begins listening for result events.
speechRecognition.onresult = async (event) => { [code block] }

after the first event is logged, as part of the event block, the timeout countdown is started.

// Restart the inactivity timeout
timeoutId = setTimeout(() => {
  console.log('Speech recognition turned off due to inactivity.');
  speechRecognition.stop();
}, inactivityTimeout);

However, the issue comes from the fact that the result events captured by speechRecognition.onresult occur in 'batches' of words. This means that it often takes longer to complete the next 'batch' of words than the timeout allows.

example:

  • I complete my first 'batch' of words and take a breath
  • this brief pause triggers the onresult code block, starting the timeout countdown
  • I then speak for more than two seconds straight
  • the result event is never captured because the next 'batch' hasn't completed
  • the timeout block fires, cancelling the recording while I am in the middle of speaking

You can observe this behavior more clearly if you edit your client side JS file to set the timeout to something larger, like 10 seconds. In this case, as long as each 'batch' of words takes less than 10 seconds to speak, the timeout will not prematurely fire.

Additional Information

I suggest increasing the inactivity timeout to a larger number, or alternatively removing the timeout and using something like speechRecognition.onspeechend instead. Docs can be found here.

Originally created by @jpetersen6202 on GitHub (Dec 3, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19727 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.6.41 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 10 ### Browser (if applicable) Chrome 142.0 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior After clicking the "dictate" microphone button on the "new chat" page, while using the Web API speech-to-text engine, the user should be able to speak with natural pauses for breath etc without the voice activity timeout firing, cutting off the voice recording. <img width="172" height="129" alt="Image" src="https://github.com/user-attachments/assets/300819e6-c4e6-419c-837f-ae818aef777f" /> ### Actual Behavior After clicking the "dictate" microphone button on the "new chat" page, the recording seems to cut off the user / speaker at random, in the middle of a sentence. ### Steps to Reproduce This issue exists in the front-end UI code, so general build and environment variables should not matter. Personally, I cloned the repo (OpenWebUI v0.6.41) and am running on Windows 10. (exact issue pointed out in lower sections) 1. Navigate to the admin panel, click the settings tab, and select "Audio" from the side bar. 2. Ensure that your "Speech-to-Text" engine is set to "Web API" 3. Navigate to home / new chat page 4. Click the "dictate" button (mic icon) and begin speaking. 5. Take an intentional gap in your speaking for a breath, then continue speaking for at least two seconds without stopping again. 6. You will notice that during your second 'batch' of words, the recording will abruptly stop, cutting you off. ### Logs & Screenshots No relevant logs or errors, as the code is technically operating as designed. I've instead included the code segment causing the issue with explanation. [VoiceRecording.svelte | line 274](https://github.com/open-webui/open-webui/blob/6f1486ffd0cb288d0e21f41845361924e0d742b3/src/lib/components/chat/MessageInput/VoiceRecording.svelte#L274) If using web stt engine, inactivity timeout is set to 2 seconds `const inactivityTimeout = 2000;` then below, `speechRecognition` begins listening for result events. `speechRecognition.onresult = async (event) => { [code block] }` after the first event is logged, as part of the event block, the timeout countdown is started. ``` // Restart the inactivity timeout timeoutId = setTimeout(() => { console.log('Speech recognition turned off due to inactivity.'); speechRecognition.stop(); }, inactivityTimeout); ``` However, the issue comes from the fact that the result events captured by `speechRecognition.onresult` occur in 'batches' of words. This means that it often takes longer to complete the next 'batch' of words than the timeout allows. **example:** - I complete my first 'batch' of words and take a breath - this brief pause triggers the onresult code block, starting the timeout countdown - I then speak for more than two seconds straight - the result event is never captured because the next 'batch' hasn't completed - the timeout block fires, cancelling the recording while I am in the middle of speaking You can observe this behavior more clearly if you edit your client side JS file to set the timeout to something larger, like 10 seconds. In this case, as long as each 'batch' of words takes less than 10 seconds to speak, the timeout will not prematurely fire. ### Additional Information I suggest increasing the inactivity timeout to a larger number, or alternatively removing the timeout and using something like `speechRecognition.onspeechend` instead. Docs can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/speechend_event).
GiteaMirror added the bug label 2026-04-25 08:30:42 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 3, 2025):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #16285 issue: Text-To-Speech doesn't work
    by frenzybiscuit • Aug 04, 2025 • bug

  2. #12283 issue: Delay before speech recording is actually working
    by Tycho-S • Apr 01, 2025 • bug

  3. #16804 issue: search and text to speech not working as intended
    by yekruz • Aug 22, 2025 • bug

  4. #16691 issue: Wrong request to OpenAI TTS
    by sr-tream • Aug 17, 2025 • bug

  5. #14338 issue: Timeout when transcripting audio file in notes
    by GlisseManTV • May 26, 2025 • bug

Show 5 more related issues
  1. #14101 issue: Speech-To-Text failure when using OpenAPI Comptaible Endpoint
    by andrefecto • May 20, 2025 • bug

  2. #19063 TTS not working in Open-WebUi
    by iSamPrime • Nov 09, 2025 • bug

  3. #15037 issue: Speech-to-Text Engine - Whisper dont'r work
    by moritzmofi • Jun 16, 2025 • bug

  4. #19260 issue: Elevenlabs TTS API Key appears unobscured in the admin/settings page
    by tomhaynes • Nov 18, 2025 • bug

  5. #13517 issue: speech to text broken in 0.6.6
    by morbificagent • May 05, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3608374072 --> @owui-terminator[bot] commented on GitHub (Dec 3, 2025): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#16285](https://github.com/open-webui/open-webui/issues/16285) **issue: Text-To-Speech doesn't work** *by frenzybiscuit • Aug 04, 2025 • `bug`* 2. [#12283](https://github.com/open-webui/open-webui/issues/12283) **issue: Delay before speech recording is actually working** *by Tycho-S • Apr 01, 2025 • `bug`* 3. [#16804](https://github.com/open-webui/open-webui/issues/16804) **issue: search and text to speech not working as intended** *by yekruz • Aug 22, 2025 • `bug`* 4. [#16691](https://github.com/open-webui/open-webui/issues/16691) **issue: Wrong request to OpenAI TTS** *by sr-tream • Aug 17, 2025 • `bug`* 5. [#14338](https://github.com/open-webui/open-webui/issues/14338) **issue: Timeout when transcripting audio file in notes** *by GlisseManTV • May 26, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#14101](https://github.com/open-webui/open-webui/issues/14101) **issue: Speech-To-Text failure when using OpenAPI Comptaible Endpoint** *by andrefecto • May 20, 2025 • `bug`* 7. [#19063](https://github.com/open-webui/open-webui/issues/19063) **TTS not working in Open-WebUi** *by iSamPrime • Nov 09, 2025 • `bug`* 8. [#15037](https://github.com/open-webui/open-webui/issues/15037) **issue: Speech-to-Text Engine - Whisper dont'r work** *by moritzmofi • Jun 16, 2025 • `bug`* 9. [#19260](https://github.com/open-webui/open-webui/issues/19260) **issue: Elevenlabs TTS API Key appears unobscured in the admin/settings page** *by tomhaynes • Nov 18, 2025 • `bug`* 10. [#13517](https://github.com/open-webui/open-webui/issues/13517) **issue: speech to text broken in 0.6.6** *by morbificagent • May 05, 2025 • `bug`* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34498