Skip to content

feat: expose audio_duration_ms in TurnPrediction#15

Merged
wavekat-eason merged 2 commits intomainfrom
feat/prediction-buffer-duration
Mar 31, 2026
Merged

feat: expose audio_duration_ms in TurnPrediction#15
wavekat-eason merged 2 commits intomainfrom
feat/prediction-buffer-duration

Conversation

@wavekat-eason
Copy link
Copy Markdown
Contributor

@wavekat-eason wavekat-eason commented Mar 31, 2026

Summary

  • Add audio_duration_ms field to TurnPrediction, reporting the detector's audio buffer fill level at prediction time
  • For PipecatSmartTurn this reflects the ring buffer length (capped at 8s)
  • Useful for pipeline orchestrators to compare segment duration vs actual model input

Test plan

  • All existing tests pass (22/22)
  • Controller mock test updated to populate the new field
  • Verify field is populated correctly with real audio in wavekat-lab

🤖 Generated with Claude Code

wavekat-eason and others added 2 commits March 31, 2026 15:44
Add audio_duration_ms field to TurnPrediction, reporting how much
audio was in the detector's buffer at prediction time. For Pipecat
this reflects the ring buffer fill level (capped at 8s).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wavekat-eason wavekat-eason merged commit f8c8226 into main Mar 31, 2026
5 checks passed
@wavekat-eason wavekat-eason deleted the feat/prediction-buffer-duration branch March 31, 2026 03:21
@github-actions github-actions bot mentioned this pull request Mar 31, 2026
wavekat-eason pushed a commit that referenced this pull request Mar 31, 2026
## 🤖 New release

* `wavekat-turn`: 0.0.5 -> 0.0.6 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.0.6](v0.0.5...v0.0.6)
- 2026-03-31

### Added

- expose audio_duration_ms in TurnPrediction
([#15](#15))
- add TurnController
([#13](#13))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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