Skip to content

feat: add TTS request reporting metrics - #118

Merged
wangyoucao577 merged 9 commits into
mainfrom
dev/tts_request
Jul 30, 2026
Merged

feat: add TTS request reporting metrics#118
wangyoucao577 merged 9 commits into
mainfrom
dev/tts_request

Conversation

@YiminW

@YiminW YiminW commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add common TTS request-level metrics and an empty final marker
  • report HTTP vendor attempts with request bytes derived from output characters
  • flush cached reporting on input end, flush, or fallback request ID changes
  • preserve the existing interleaved-request buffering and TTS state behavior
  • merge vendor metadata before final redaction
  • keep masking idempotent and behaviorally aligned across Python and Go
  • precompile the masked-value recognizers and guard them by canonical output length
  • bump ten_ai_base from 0.7.57 to 0.7.58

Testing

  • uv run pytest --noconftest tests/test_tts2_http.py -q (13 passed)
  • Python utility tests in the TEN Linux container (54 passed)
  • go test ./...
  • go test -run "^$" -bench "^BenchmarkMaskSecret$" ./tests (~179 ns/op on Apple M4)
  • modified Python files compile successfully

Comment thread interface/ten_ai_base/utils.py Outdated
Comment thread interface/ten_ai_base/tts2.py Outdated
@wangyoucao577
wangyoucao577 merged commit 6090b16 into main Jul 30, 2026
6 of 7 checks passed
@wangyoucao577
wangyoucao577 deleted the dev/tts_request branch July 30, 2026 05:19
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.

3 participants