feat: tts request - #2283
Conversation
|
Review — feat: tts request (rime_tts 0.4.10 → 0.4.11) Small, focused diff: emit a TTS request metric from 1. A metrics failure can abort real audio synthesis (main concern) The new self.sent_tts = True
self.metrics_add_output_characters(len(t.text))
if t.text:
await self.send_tts_request_metrics(...)
await self.client.send_text(t)If Telemetry should be best-effort. Suggest isolating it: if t.text:
try:
await self.send_tts_request_metrics(
request_id=t.request_id,
request_time_ms=int(time.time() * 1000),
request_text=t.text,
)
except Exception as e:
self.ten_env.log_warn(f"Failed to send tts request metrics: {e}")Also note 2. Emits once per text chunk, not once per request — is that intended?
The parameter name 3. Guard is inconsistent with how "empty" is defined elsewhere in this method The new code gates on Separately, 4. Base-class dependency pin may need bumping I could not verify that
5. No test coverage for the new behavior
Minor
Nothing here is architecturally wrong — item 1 is the one I would treat as blocking, since it converts a telemetry hiccup into user-visible audio loss. Items 2 and 3 are quick clarifications. |
|
Review of the added Note on scope: 1. The test asserts on a base class that lives outside this package
2. The only await self.send_tts_request_metrics(
request_id=t.request_id,
request_time_ms=int(time.time() * 1000),
request_text=t.text,
)That is an absolute Unix epoch timestamp in milliseconds, not an elapsed duration. If 3. If the base invokes 4. Direct instantiation may make the test pass for the wrong reason Every other test in this package drives the extension through
The existing 5. Placement and coverage
6. Minor
Nothing here is a blocker on correctness of shipped code, since the change is test-only. The substantive concerns are points 2 and 4: as written the test can pass without verifying anything, or fail intermittently. |
ReviewSmall, focused addition — one test in 1. The test targets an external dependency, not this extension
Two consequences:
I could not run this test to confirm it passes — 2. Wrong file
More to the point, 3.
|
No description provided.