Repository navigation
Conversation
Yoob text to speech (OpenAI-compatible /v1/audio/speech, HTTP and WebSocket streaming with emotion and sound tags) and speech to text (yoob-asr-turbo-v1 / yoob-asr-pro-v1, batch and realtime WebSocket with interim results). Adds the yoob extra, the uv workspace entry, and yoob to tests/test_tts.py and tests/test_stt.py.
…iming) - STT and TTS sockets connect with autoping=False and read through utils.aio.WebSocketMonitor, so a half-open connection fails within conn_options.liveness_timeout instead of hanging. - STT: a final that follows VAD silence closes the turn it belongs to (start, final, end) instead of opening a second one; a late partial stays in its turn too. - STT: multichannel input is mixed down to mono before resampling. - STT: no ready message is an APITimeoutError (retryable), not a bare asyncio.TimeoutError; after stop, the last results must arrive within conn_options.timeout (non-retryable: the audio is spent). - STT: END_OF_SPEECH carries speech_end_time from the utterance's last final, so endpointing counts from the end of speech. - STT: recognize() honours conn_options.timeout (FallbackAdapter's attempt timeout) instead of a fixed 60 s. - TTS: once all text is sent, audio or done must keep arriving within conn_options.timeout. - README: LiveKit docs links; tests section points at the shared suites. - tests/test_plugin_yoob.py: offline tests for each of the above.
- STT: a send that fails after end_input() is not retried; the frames the dead connection consumed cannot be replayed. - TTS: the render deadline starts when the end message is sent and resets on every message; one read stays outstanding across the phases. - STT: recognize() gives the whole request one budget, ClientTimeout(total=conn_options.timeout). - tests/test_plugin_yoob.py: a test for each (3 fail on the previous commit).
stream() ignored the model (every stream ran yoob-asr-turbo-v1) and every transcript was tagged English. The model and a new language option (also stream(language=...) and recognize(language=...)) now go to the API; transcripts carry the requested or detected language. Tests for both; live check: Turbo and Pro streams transcribe and label en.
…n the user's device The agent announces the character in its attributes (yoob.avatar.character, yoob.avatar.version) and opens Yoob sessions for the people in the call over an RPC (yoob.avatar.session), with the agent's own Yoob key. The user's browser renders the character with the Yoob web SDK from the agent's normal audio track: no avatar server, no video track. Offline tests against a fake of Yoob's session API.
ofirkris
force-pushed
the
yoob-avatar
branch
from
November 24, 2026 22:01
640687f to
3cd173b
Compare
ofirkris
marked this pull request as ready for review
November 24, 2026 22:02
Once end_input() has been called the audio this connection consumed cannot be replayed, so a retry (for example after a busy answer to stop) would reconnect with nothing to send and could finish without the transcript or an error. Any retryable error then becomes final, with the server's reason kept; errors while input is still open stay retryable. Test: busy after stop with retries enabled fails once, with one connection.
Author
|
On the |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
yoob.AvatarSessiontolivekit-plugins-yoob: a Yoob character as the agent's face, rendered on the user's own device.Stacked on #8718 (the Yoob TTS and STT plugin). Only the last commit is new here.
Unlike the server-side avatar plugins, nothing joins the room and no video is streamed. The user's app runs a Yoob SDK (web
@yoob/avatar/livekit, iOSYoobLiveKit, Androidyoob-avatar-livekit), which plays the agent's normal audio track through the character, so the call uses only audio bandwidth. This plugin is the agent's half:yoob.avatar.character,yoob.avatar.version)yoob.avatar.session: when the user's app asks, it opens a Yoob session with the agent'sYOOB_API_KEYand returns it, so the key stays with the agent and the app needs no backend of its own for itmax_sessions_per_minute)wait_for_join()waits until a device has opened its session;aclose()unregisters the RPC and clears the attributesThe character builds the web and Android SDKs load by default carry a visible Yoob watermark baked into the footage; nothing is drawn over the video at runtime.
Checks run locally:
ruff check,ruff format --check,mypy -p livekit.plugins.yoob, 8 new offline tests against a fake of Yoob's session API (attributes, RPC registration, agent callers refused, per-minute cap, refusals passed on without retry, 5xx retried, invalid answers not retried, setup errors), 23/23 with the existing Yoob tests. In a real LiveKit room (livekit-server1.13, this branch's agents): the user's side read the announced character 3 s after joining (agent start-up), the session RPC answered in 6 ms against a local stand-in of the session API, and against the real API with an invalid key the user received Yoob'sunauthorizedreason.CI:
test-sttfails on this fork as it does on #8718: providers without credentials in fork CI (OpenAI, AWS, Fireworks); the Yoob tests are skipped there. AYOOB_API_KEYfor your CI is available on request.