Skip to content

Translation: natural voices, voice filter, Gemini Live Translate (2.10.0-beta1) - #20

Closed
ttabouch12 wants to merge 13 commits into
mainfrom
feature/natural-voice
Closed

ttabouch12 wants to merge 13 commits into
mainfrom
feature/natural-voice

Conversation

@ttabouch12

Copy link
Copy Markdown
Owner

Beta for the call-translation upgrade (2.10.0-beta1). Research notes behind the choices: natural voices, speed, and background-voice filtering.

Natural voices

  • New Voice for translated speech setting: phone voice (as before), Gemini TTS (gemini-3.1-flash-tts-preview, overridable) or ElevenLabs Flash v2.5 (streamed 16 kHz PCM).
  • The voice follows each speaker: male or female, picked from the median pitch of their speech. Both sides get different voices.
  • Translations are spoken sentence by sentence while the rest is still streaming in, on a separate thread per direction.
  • Record my voice: about 30 s of my own voice becomes an ElevenLabs instant clone, used for my words to the caller. Needs a paid ElevenLabs plan.

Gemini Live Translate (experimental switch)

  • gemini-3.5-live-translate-preview over the Live API WebSocket (OkHttp), one session per direction, 100 ms chunks of 16 kHz PCM, 24 kHz audio back.
  • Voice-like-the-speaker output plus both transcripts for captions; reconnects on goAway or errors.

Ignore background voices (on by default)

  • Silero VAD (MIT, 2.2 MB model in assets, ONNX Runtime) replaces the loudness gate in the segmenter, with hysteresis.
  • LevelGate drops utterances 12 dB or more below the main talker on that side.
  • Groq Whisper now returns verbose_json; segments with no_speech_prob > 0.6 && avg_logprob < -1 or compression_ratio > 2.4 are dropped.
  • The translator answers <skip> for words not meant for the call; those lines are removed from the captions.

Other

  • Pre-release versions (with a - suffix) publish with --prerelease, so self-update (which reads releases/latest) skips them.
  • Fixed the flaky SipShutdownTest (port re-bind raced the socket close) and two compiler warnings.
  • New strings in all 8 languages.

Generated by Claude Code

ttabouch12 and others added 7 commits December 4, 2026 23:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
…0.0-beta1)

- Natural voices for translated speech: Gemini TTS or ElevenLabs Flash v2.5,
  streamed and spoken sentence by sentence, matched to each speaker's pitch.
- ElevenLabs instant clone of my own voice from a ~30 s recording.
- Gemini Live Translate (experimental): speech to speech in a voice like the
  speaker's, one session per direction.
- Voice filter: Silero VAD (MIT) replaces the loudness gate, a level gate keeps
  the main talker, Whisper segments with low confidence are dropped, and the
  translator skips words that weren't meant for the call.
- Pre-releases publish with --prerelease so self-update skips them.
- Fix a flaky SIP shutdown test and two compiler warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
…0.0-beta1)

- Natural voices for translated speech: Gemini TTS or ElevenLabs Flash v2.5,
  streamed and spoken sentence by sentence, matched to each speaker's pitch.
- ElevenLabs instant clone of my own voice from a ~30 s recording.
- Gemini Live Translate (experimental): speech to speech in a voice like the
  speaker's, one session per direction.
- Voice filter: Silero VAD (MIT) replaces the loudness gate, a level gate keeps
  the main talker, Whisper segments with low confidence are dropped, and the
  translator skips words that weren't meant for the call.
- Pre-releases publish with --prerelease so self-update skips them.
- Fix a flaky SIP shutdown test and two compiler warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
Its JNI code looks classes up by name, so R8 must not rename or drop them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
They belong only on publish/* branches; ignore the folder elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM

Copy link
Copy Markdown
Owner Author

Squash-merge this one: an earlier commit on the branch briefly held the 2.9.4 APKs (removed again), and squashing keeps them out of main's history.


Generated by Claude Code

ttabouch12 and others added 6 commits December 5, 2026 11:42
- EchoGuard: learns how loud the earpiece leaks into the mic and only
  translates my mic when I'm clearly talking; ducks the translation while I
  talk; drops lines that repeat a translation just played to me.
- Segmenter cuts nonstop speech into ~5 s chunks at a breath (8 s max).
- Speak faster when translated speech piles up.
- Start the translator (and floating button) when call audio arrives after
  the call connects.
- Remove ElevenLabs; Gemini voices and Live Translate use the free tier.
- Full-contrast colors in saved call transcripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
…s silent (#21)

Automatic now checks the downlink 4 s into the call. If the redirected
capture delivers digital silence, the whole call moves to Direct telephony
(record and track) and the choice is remembered per build fingerprint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
…-rc1)

- Gateway opens call audio while an outgoing call is dialing and sends it to
  the main phone as SIP early media (183 Session Progress); the phone plays it
  listen-only and starts captions (no spoken translation before answer).
- Early taps skip the HAL and silence probes; the tap is reopened at answer.
- Native libraries stored compressed (APKs about half the size).
- Fix octave errors in pitch detection.
- Unit tests for translation logic and early media; fix or justify build
  warnings; retry Gradle in CI when dependency downloads fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6dfuLYcfqCCHsvZhJ8pKM
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