Use laptop MP3 TTS playback
This commit is contained in:
34
README.md
34
README.md
@@ -109,7 +109,39 @@ npm run start
|
||||
|
||||
## Speech Input And Playback
|
||||
|
||||
Playback works directly in Expo Go. AI replies are read aloud through the iPhone speaker. The chat also has buttons for `Read last answer` and `Stop`.
|
||||
Playback uses a local MP3 TTS server on the laptop. AI replies are sent to the laptop, converted to an MP3 with a Microsoft neural English voice, and then played on the iPhone. This avoids the robotic iPhone system voice.
|
||||
|
||||
Start the TTS server in a second terminal:
|
||||
|
||||
```bash
|
||||
npm run tts:start
|
||||
```
|
||||
|
||||
For Expo Go on iPhone, `.env` must point to the laptop IP:
|
||||
|
||||
```text
|
||||
EXPO_PUBLIC_TTS_BASE_URL=http://192.168.10.33:3333
|
||||
EXPO_PUBLIC_TTS_VOICE=en-US-JennyNeural
|
||||
EXPO_PUBLIC_TTS_RATE=0.88
|
||||
EXPO_PUBLIC_TTS_PITCH=+0Hz
|
||||
```
|
||||
|
||||
Useful English voices:
|
||||
|
||||
- `en-US-JennyNeural`
|
||||
- `en-US-AvaNeural`
|
||||
- `en-US-EmmaNeural`
|
||||
- `en-US-GuyNeural`
|
||||
- `en-GB-SoniaNeural`
|
||||
- `en-GB-RyanNeural`
|
||||
|
||||
You can list available voices while the TTS server is running:
|
||||
|
||||
```text
|
||||
http://192.168.10.33:3333/voices
|
||||
```
|
||||
|
||||
The chat has buttons for `Read last answer` and `Stop`.
|
||||
|
||||
Speech input currently works through the iPhone keyboard:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user