Skip to content

Add FunASR/SenseVoice API backend - #1554

Open
LauraGPT wants to merge 11 commits into
chidiwilliams:mainfrom
LauraGPT:codex/funasr-api-backend
Open

Add FunASR/SenseVoice API backend#1554
LauraGPT wants to merge 11 commits into
chidiwilliams:mainfrom
LauraGPT:codex/funasr-api-backend

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • add a first-class FunASR API model backed by a separately running FunASR/SenseVoice OpenAI-compatible server
  • support file/folder imports, live recording, and the funasrapi CLI model type
  • add configurable base URL and model settings, with environment overrides for protected or remote endpoints
  • keep FunASR credentials isolated from the saved OpenAI key and enforce the backend's transcription-only contract
  • document server setup and usage across preferences, file import, live recording, and CLI guides

Boundary fixes

  • allow live recording to start without a local model path for FUNASR_API, matching the existing OpenAI API behavior
  • disable unsupported word-level parsing for FunASR responses so a text-only or empty-segment response cannot raise TypeError or discard the transcript
  • omit prompt and timestamp_granularities fields that the FunASR endpoint does not support

Current-main refresh

  • merge current main@d1b6844d851cb475e6532299d18181d10681ff9b without rewriting the feature history
  • resolve the only conflict in docs/docs/preferences.md, retaining both the upstream GPU-memory preference and the complete FunASR API settings documentation
  • incorporate seven upstream commits covering Windows playback, CI caches, speaker identification, packaging, and build workflows without leaking those upstream-only files into the PR diff
  • current SSH-signed, DCO-compliant head: ba87e21b460b75c5cc77e6a2abc06167ce718b30

Verification

  • focused API, CLI, model-loader, file/recording, preferences, and UI suite: 352 passed
  • exact final candidate broad repository suite: 1146 passed, 10 skipped (run twice after preparing generated translations; final run completed in 561.27s)
  • the previously failing localized-preferences test passes after the repository-standard make translation_mo generated all 15 ignored locale artifacts
  • frozen uv lock check with uv 0.11.29, Python 3.12.3, Transformers 5.14.1, and Torch 2.8.0+cu129
  • all 22 changed Python files compile; Ruff reports zero diagnostics on PR-added lines, and all three newly added Python files pass the complete lint and formatter checks
  • workflow YAML and project TOML parsing, submodule cleanliness, conflict-marker scan, whitespace checks, and git diff --check
  • final PR scope remains exactly 27 files (+712/-58)

GitHub reports the PR MERGEABLE on the exact head, with no unresolved review threads. The exact-head CI and Snapcraft runs are action_required with zero jobs, so a maintainer must approve the fork workflows before GitHub can execute them. The pre-refresh head is retained at LauraGPT/buzz:codex/backup-buzz-1554-2b77a036-20260811 for rollback.

Closes #1140

@LauraGPT

LauraGPT commented Jul 14, 2026

Copy link
Copy Markdown
Author

Follow-up for head c7951ec: review found and fixed two contributor-side boundaries before maintainer review:

  • live recording now allows the empty local model path required by FUNASR_API;
  • FunASR file transcription disables unsupported word-level parsing and preserves text-only/empty-segment responses instead of raising TypeError or returning no transcript.

Current local verification is green: 13 focused FunASR tests, 96 recording-widget tests, and the broad repository suite (1037 passed, 4 skipped), plus Ruff on the changed production modules and git diff --check.

The new CI and Snapcraft runs are both action_required with zero jobs, so they need maintainer approval before GitHub can execute them. No rush given your summer schedule; approval and review whenever convenient would be appreciated.

@raivisdejus

Copy link
Copy Markdown
Collaborator

Summer is busy time, but sure, I will review this.

@LauraGPT

LauraGPT commented Jul 18, 2026

Copy link
Copy Markdown
Author

Refreshed this PR onto current main@d1b6844d851c with an SSH-signed, DCO-compliant merge commit. The only conflict was in docs/docs/preferences.md; the resolution keeps both the upstream GPU-memory preference and the full FunASR API settings documentation.

Validation on exact head ba87e21b460b:

  • focused FunASR/API/CLI/model/UI suite: 352 passed
  • broad repository suite: 1146 passed, 10 skipped (final candidate run: 561.27s)
  • localized-preferences regression: passed after generating all 15 locale artifacts with the repository's make translation_mo target
  • uv lock --check, changed-file Python compilation, workflow YAML and TOML parsing
  • zero Ruff diagnostics on PR-added lines; all three new Python files pass complete Ruff lint and formatter checks
  • clean submodules, conflict-marker and whitespace scans, and git diff --check
  • exact PR scope: 27 files, +712/-58

GitHub now reports MERGEABLE against current main, with no unresolved review threads. The exact-head CI and Snapcraft runs are action_required with zero jobs, so they require maintainer approval before GitHub can execute them. The old head remains available on codex/backup-buzz-1554-2b77a036-20260811 for rollback.

LauraGPT added 3 commits July 27, 2026 01:34
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>

# Conflicts:
#	docs/docs/index.md
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
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 alternative transcription engine

2 participants