Skip to content

feat(voice): voice input migration to eleven labs#4041

Merged
icecrasher321 merged 12 commits intostagingfrom
feat/voice-improvements
Apr 8, 2026
Merged

feat(voice): voice input migration to eleven labs#4041
icecrasher321 merged 12 commits intostagingfrom
feat/voice-improvements

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

Standardize STT interface for Mothership and deployed chat voice input. Should let it work on all browsers now, and billed correctly with rate limits.

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 8, 2026

PR Summary

Medium Risk
Introduces new unauthenticated/visitor-facing endpoints and billing-side effects (usage recording and new usage_log_source value), plus realtime WebSocket audio streaming; regressions could impact chat UX, rate limiting, or cost enforcement.

Overview
Migrates voice input speech-to-text from browser SpeechRecognition to an ElevenLabs Scribe v2 Realtime WebSocket pipeline, shared across Mothership and deployed chat voice mode via new useSpeechToText, lib/speech/*, and an STT token endpoint.

Adds server-side configuration gating (GET /api/settings/voice) so mic controls are hidden when ELEVENLABS_API_KEY is unset, and introduces POST /api/speech/token to mint single-use STT tokens, enforce rate limits/cost limits, and bill a fixed per-session charge (usage_log_source now includes voice-input).

Standardizes client IP extraction with a new getClientIp helper and switches several endpoints/loggers (A2A fingerprinting, public form rate limiting, audit, cron auth, webhooks, proxy suspicious-request logging, Profound analytics) to use it. Also updates CSP connect-src to allow ElevenLabs HTTP/WS connections and documents voice session costs/durations.

Reviewed by Cursor Bugbot for commit 7f1a16c. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 8, 2026 7:56am

Request Review

@icecrasher321
Copy link
Copy Markdown
Collaborator Author

bugbot run

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 8, 2026

Greptile encountered an error while reviewing this PR. Please reach out to [email protected] for assistance.

@icecrasher321
Copy link
Copy Markdown
Collaborator Author

bugbot run

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7f1a16c. Configure here.

@icecrasher321 icecrasher321 merged commit efb582e into staging Apr 8, 2026
12 checks passed
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.

1 participant