Commit 8148beb
Fix WebSocket script to use free-tier compatible audio format
The script was using pcm_44100 format which requires ElevenLabs Pro tier,
causing WebSocket connections to close with error 1008. Fixed by:
- Changed TTS_OUTPUT_FORMAT from pcm_44100 to mp3_44100_128 (free tier)
- Added pydub dependency for MP3 decoding
- Updated AudioQueue.add() to decode MP3 chunks before playback
- Enhanced WebSocket close handler to log error details
- Updated docstring to reflect MP3 format usage
The script now works with free tier ElevenLabs accounts.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent fb5749c commit 8148beb
File tree
2 files changed
+20
-10
lines changed- third_party/ElevenLabs
2 files changed
+20
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
Lines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
110 | 111 | | |
111 | | - | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | | - | |
117 | | - | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
289 | 297 | | |
290 | 298 | | |
291 | 299 | | |
292 | | - | |
| 300 | + | |
| 301 | + | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| |||
0 commit comments