Skip to content

feat: add configurable voice transcription - #6860

Open
LauraGPT wants to merge 1 commit into
ChatGPTNextWeb:mainfrom
LauraGPT:codex/funasr-transcription-endpoint-6803
Open

feat: add configurable voice transcription#6860
LauraGPT wants to merge 1 commit into
ChatGPTNextWeb:mainfrom
LauraGPT:codex/funasr-transcription-endpoint-6803

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • add opt-in voice transcription backed by any OpenAI-compatible /v1/audio/transcriptions endpoint
  • configure the endpoint, model, and optional bearer token without bundling a speech runtime into NextChat
  • proxy web requests through NextChat to avoid browser CORS failures; desktop builds call local endpoints directly
  • append transcripts to the current draft without automatically sending the message
  • release microphone tracks on success, recorder errors, construction failures, and component cleanup
  • add English and Simplified Chinese settings copy plus recorder, request, config, and persistence coverage

The defaults target a local FunASR/SenseVoice-compatible endpoint at http://localhost:8000/v1, while remaining provider-agnostic. Web deployments use NextChat’s existing same-origin proxy boundary, so a colocated or network-reachable transcription service does not need browser CORS configuration.

Validation

  • yarn test:ci --runInBand: 38 suites, 176 tests passed
  • yarn tsc --noEmit: passed
  • targeted ESLint for all changed files: 0 errors (4 existing warnings in chat.tsx)
  • yarn build: passed

The full next lint command still hits the repository tooling crash in unchanged app/constant.ts:1 (unused-imports/no-unused-imports reading loc); the production build completes despite reporting that same lint-plugin warning.

Closes #6803

@LauraGPT

LauraGPT commented Jul 26, 2026

Copy link
Copy Markdown
Author

Rebased onto current main (defdcdb5) and updated the implementation at signed+DCO head 4fd2ab76508367bba254b5dda307fe36f0538264.

The web path now uses NextChat’s same-origin proxy instead of requiring browser CORS from the transcription server; desktop builds continue to call local endpoints directly. Blank model values are rejected before upload, and the settings copy now follows the existing English/Simplified Chinese locale structure.

Exact-head validation:

  • 38/38 Jest suites, 176/176 tests
  • yarn tsc --noEmit
  • targeted ESLint: 0 errors (4 existing warnings in unchanged portions of chat.tsx)
  • production yarn build

The only full-lint limitation remains the repository tooling crash in unchanged app/constant.ts:1 (unused-imports/no-unused-imports reading loc); the build completes with that warning.

@codeCraft-Ritik codeCraft-Ritik left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really solid work. I appreciate that the optimization focuses on eliminating unnecessary allocations while maintaining the same parser behavior. The additional regression tests around slicing, concatenation, and lazy evaluation make this a well-rounded change. 👏 @LauraGPT

@LauraGPT
LauraGPT force-pushed the codex/funasr-transcription-endpoint-6803 branch from 46f6736 to 640c0b8 Compare August 17, 2026 04:05
Signed-off-by: zhifu gao <18321252+LauraGPT@users.noreply.github.com>
@LauraGPT
LauraGPT force-pushed the codex/funasr-transcription-endpoint-6803 branch from 640c0b8 to 4fd2ab7 Compare August 17, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add FunASR/SenseVoice as a local STT engine

2 participants