Commit graph

4 commits

Author SHA1 Message Date
malibrated
4ead99754a Minor improvements to account for large-VRAM Apple Silicon machines, and refine the inferencing code to ignore spurious, non-audio responses from the Orpheus model, use the system prompt if it exists in the directory structure, and for long texts, 1) use nltk for segmenting the text according to user-specified max character lengths, and 2) use the previous segment (For segment index n>1) as context in the system prompt, to hopefully improve audio generation consistency. 2025-04-21 22:30:33 -07:00
Lex-au
a95e814fc7 tts_engine push
Updated tts_engine/speechpipe.py:

- Enhanced the turn_token_into_id function with better documentation
- Added proper type hints and parameter descriptions
- Made the token prefix constant explicitly defined (CUSTOM_TOKEN_PREFIX)
- Increased the cache size from 1000 to 10000 entries for better performance

Updated tts_engine/inference.py:

- Imported the token handling from speechpipe.py
- Removed the duplicate implementation of turn_token_into_id
- Added a comment explaining the function is now imported

| Metric | Original Model | Q8 Model | Improvement |
|--------|---------------|----------|-------------|
| Token generation | ~280 tokens/sec | ~390 tokens/sec | ~40% faster |
| Realtime factor | 1.4-1.7x | 2.1-2.3x | ~50% faster |
| Audio generation | ~19-20 chunks/sec | ~26 chunks/sec | ~35% faster |
| Overall latency | Lower | Much lower | Substantial
2025-03-24 19:53:53 +11:00
Lex-au
bcd7403cd0 v1.1.0
lgtm
2025-03-23 07:48:07 +11:00
Lex-au
d1869cc13b Push repo 2025-03-22 03:48:38 +11:00