Skip to content

Conversation

@JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Oct 7, 2025

…hunk

companion to OpenVoiceOS/ovos-audio#132

Summary by CodeRabbit

  • New Features
    • Real-time display of the specific text segment currently being spoken during TTS playback.
    • More precise “now speaking” indicators and progress feedback across compatible audio interfaces.
    • Improved synchronization for viseme-driven or lip-sync visuals by aligning to sentence chunks.
    • Enhanced integration with audio components for accurate status updates about the active utterance segment.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Updates TTS execution to write the current utterance chunk into message.data["utterance"] after viseme computation and before queuing audio. No public APIs changed. Affects only ovos_plugin_manager/templates/tts.py.

Changes

Cohort / File(s) Summary
TTS playback context update
ovos_plugin_manager/templates/tts.py
In the _execute loop, after computing visemes for a sentence chunk, sets message.data["utterance"] to the current chunk before enqueueing audio, enabling downstream components to know the active text segment.

Sequence Diagram(s)

sequenceDiagram autonumber participant Client as Client Code participant TTS as TTS Engine participant Vis as Viseme Generator participant Bus as Message/Context participant Audio as Audio Queue/Service Client->>TTS: speak(text) loop For each sentence chunk TTS->>Vis: compute visemes(chunk) Vis-->>TTS: visemes TTS->>Bus: update message.data["utterance"] = chunk TTS->>Audio: enqueue audio(chunk, visemes) Audio-->>Client: playback events (progress) end 
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws to utterance beats,
Each chunk now tagged as the speaker repeats—
Visemes dance, the queue rolls on,
A breadcrumb trail from dusk to dawn.
With every nibble of voiced delight,
I track the text through lunar night. 🐇🎧

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title clearly and concisely describes the main change of passing the actual text for each audio chunk to ovos-audio, directly reflecting the added assignment to the Message object in the TTS loop. It specifies the component affected and the intended fix without using vague terms or unnecessary detail. As a result, the title is specific, descriptive, and aligned with the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/audio_chunk_utterance

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60c8357 and c33e64d.

📒 Files selected for processing (1)
  • ovos_plugin_manager/templates/tts.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: unit_tests (3.10)
  • GitHub Check: unit_tests (3.11)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the fix label Oct 7, 2025
@github-actions github-actions bot added fix and removed fix labels Oct 7, 2025
@JarbasAl JarbasAl merged commit 564b594 into dev Oct 7, 2025
5 of 8 checks passed
@JarbasAl JarbasAl deleted the fix/audio_chunk_utterance branch October 7, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants