Commit Graph

7 Commits

Author SHA1 Message Date
hailin b70c1dd071 feat: append concise reply hint to Antaf queries
Ant Afu tends to give long replies which causes TTS queue delays.
Append "请用2-3句话简短回答" to reduce response length.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 04:30:32 -07:00
hailin 5679622996 fix: resample TTS audio from 44100Hz to 24000Hz for device compatibility
Model outputs 44100Hz but device expects 24000Hz via Opus. Without
resampling, audio plays at wrong speed causing 29s delays between
segments. Verified: synthesis+resample takes 0.38s for 1.6s audio.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 23:11:48 -07:00
hailin 9b2b875c2b fix: run TTS synthesis in thread pool to avoid blocking event loop
Also add size check for int8 model to skip LFS pointer files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 23:05:44 -07:00
hailin 83cdf3396d fix: use full onnx model with 8 threads for fast local TTS
Benchmark: short=0.37s, long=1.06s with 8 CPU threads.
GPU not available in pip sherpa-onnx, CPU is fast enough.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 22:53:59 -07:00
hailin c2727d7e08 fix: clean junk text from Antaf + use int8 TTS model for speed
- Filter "完成资料引用" and other status text from Antaf responses
- Use int8 quantized model for faster TTS inference
- Add configurable num_threads for sherpa-onnx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 22:52:02 -07:00
hailin e5599d4f43 feat: add sherpa-onnx local TTS provider
Offline VITS TTS using sherpa-onnx, no network dependency.
Uses vits-melo-tts-zh_en model for Chinese/English.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 22:43:51 -07:00
hailin 742389e965 add backend code 2026-04-05 19:01:15 +00:00