8000 feat(voice): send transcription, speakers and speech to cloud providers by adeelahmad · Pull Request #116 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(voice): send transcription, speakers and speech to cloud providers - #116

Merged
adeelahmad merged 3 commits into
mainfrom
claude/cloud-voice-providers-iuvzld
Oct 4, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/cloud-voice-providers-iuvzld

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: transcription, speaker separation and emotion only ran locally (SenseVoice, Whisper, SpeechBrain), and spoken answers only came from an OpenAI-compatible speech server.

After: local engines stay the default and behave exactly as before. An admin can send each voice task to a provider instead: an OpenAI-compatible Whisper endpoint, ElevenLabs (speech to text and text to speech), AssemblyAI or Deepgram (speech to text and Aura text to speech). Every provider has its own base URL, so a proxy, a regional endpoint or a compatible server works too.

How:

  • New speech settings section (base URL, model, sealed API key per provider; sentiment switch; timeout) and Settings → Speech providers with a Test button per provider (POST /settings/speech/test, lists models, nothing billed).
  • transcribe.engine gains openai, elevenlabs, assemblyai, deepgram (app/domain/speech.py). Provider transcripts carry speaker labels, language, audio events (ElevenLabs) and sentiment as emotion (AssemblyAI, Deepgram). Audio goes out as Ogg Opus 32k (FLAC fallback); long audio is chunked for OpenAI-compatible servers (25 MB limit).
  • diarize.engine gains provider; auto uses provider labels when a transcript has them, otherwise unchanged. Voice IDs still come from local voiceprints.
  • Voice chat: voice.stt (default same = transcription engine) and voice.tts_provider (openai default, elevenlabs, deepgram).
  • Provider calls go through the activity ledger when it lands (soft import, no dependency).
  • Docs: docs/speech-providers.md. DEVLOG plan added; the local GGUF/llama.cpp part comes as a separate PR.

No migration needed: new settings keys have defaults, and the new provider_speaker segment field lives on a schemaless table.

Motivation and Context

Adeel asked for voice tasks to be outsourceable to other platforms, with custom endpoints for any service, while keeping local processing as is.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (ruff, prettier, eslint, tsc clean).
  • I added or updated tests (tests/domain/test_speech.py with a fake server for all four providers at custom addresses; __tests__/settings-speech.test.tsx).
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Local runs: backend 545 passed, 1 failed (the known environmental LibreOffice conversion test); frontend 79 suites, 656 tests passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Fki157VgxFETzSSpwFwYe


Generated by Claude Code

Local SenseVoice/Whisper stay the default. Each voice task can now go to an
OpenAI-compatible server, ElevenLabs, AssemblyAI or Deepgram, each with its
own base URL (proxies, regional or compatible servers), model and sealed key.

- transcribe.engine: openai, elevenlabs, assemblyai, deepgram; transcripts
  carry provider speakers, language, audio events and sentiment as emotion
- diarize.engine provider (and auto) use the provider's speaker labels
- voice.stt picks the voice chat engine; voice.tts_provider adds ElevenLabs
  and Deepgram Aura next to the OpenAI-compatible speech server
- Settings > Speech providers with a Test button per provider
- POST /settings/speech/test; docs/speech-providers.md; DEVLOG plan

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Fki157VgxFETzSSpwFwYe
@adeelahmad adeelahmad self-assigned this Oct 4, 2026
@adeelahmad
adeelahmad merged commit 8bd13aa into 893B main Oct 4, 2026
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.

2 participants

0