Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Seeking twice before the Blob source’s metadata loads applies the first target instead of the latest one because the pending seek callback is not updated.
1 open issue
What changed in this PR
This PR centralizes fallback voice selection and extends read-aloud support for long messages across speech generation and browser playback.
Changes:
- Reuses voice fallback logic for streaming and cached previews.
- Splits long text into sequential speech requests with per-segment timeouts and combined usage.
- Adds windowed audio buffering, full-audio seeking, sliced waveform decoding, and supporting documentation.
| File | Description |
|---|---|
packages/shared/src/speech/utils.ts |
Adds shared voice selection helpers. |
packages/shared/src/speech/streaming/start-streaming.ts |
Reuses voice fallback for streaming. |
packages/shared/src/speech/speech-service.ts |
Applies fallback consistently to previews and cache keys. |
packages/shared/src/speech/speech-service.test.ts |
Updates unknown-voice coverage for fallback behavior. |
packages/ai-core/src/speech/text/split.ts |
Splits text at paragraph, sentence, and word boundaries. |
packages/ai-core/src/speech/text/split.test.ts |
Tests splitting limits and content preservation. |
packages/ai-core/src/speech/text/preprocess.ts |
Adds a pass-through preprocessing hook. |
packages/ai-core/src/speech/stream-segments.ts |
Streams segments sequentially and combines usage. |
packages/ai-core/src/speech/stream-segments.test.ts |
Tests ordering, failures, timeouts, and early termination. |
packages/ai-core/src/speech/generate-stream.ts |
Integrates splitting and per-segment timeouts. |
docs/concepts/text-to-speech.md |
Documents speech generation and playback behavior. |
docs/concepts/README.md |
Links the text-to-speech guide. |
apps/chat-bot/src/utils/audio/mp3-waveform.ts |
Computes waveform peaks through sliced decoding. |
apps/chat-bot/src/utils/audio/mp3-stream-player.ts |
Adds windowed buffering and Blob-backed seeking. |
apps/chat-bot/src/utils/audio/mp3-frames.ts |
Parses MP3 frames and calculates duration. |
apps/chat-bot/src/components/chat/speech/use-audio-stream.ts |
Logs playback failures before cleanup. |
Review effort: Balanced
Playwright Smart ReporterPassed: 39 of 39 tests passed.
Baseline run: Slowest tests
|
rlaerm
marked this pull request as ready for review
November 11, 2026 16:29
rlaerm
requested review from
AsamMax,
TobiasWallura-xitaso,
brueckb,
recursive-hub and
stschaller-xitaso
as code owners
November 11, 2026 16:29
…-voice # Conflicts: # apps/chat-bot/src/utils/audio/mp3-stream-player.ts
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.

No description provided.