You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .env.sample
+1-1
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ KOKORO_TTS_VOICE=af_bella
48
48
49
49
# AUDIO GENERATION LENGTH
50
50
# Maximum character length for audio generation - set to 2000+ for stories and games, 3000 for assassin story, 4000 for mars encounter interactive
51
-
# MAX_CHAR_LENGTH is used for openaiand elevenlabs, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider
51
+
# MAX_CHAR_LENGTH is used for openai, elevenlabs and kokoro, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider
52
52
MAX_CHAR_LENGTH=1000
53
53
# XTTS Max Number of characters to generate audio, default is 255 but we are overriding that
Copy file name to clipboardExpand all lines: README.md
+20-23
Original file line number
Diff line number
Diff line change
@@ -121,18 +121,18 @@ If you are only using speech with Openai or Elevenlabs then you don't need this.
121
121
122
122
[Kokoro TTS](https://github.com/remsky/Kokoro-FastAPI) is an open-source neural text-to-speech system based on the Kokoro-82M model, offering high-quality voice synthesis with various male and female voices.
123
123
124
-
Install it based on the instructions in the Kokoro repo.
124
+
Install it based on the instructions in the Kokoro repo, like run it in docker, then you can connect to the api endpoints to use it's voices.
125
125
126
126
To use Kokoro TTS:
127
127
128
128
1. Configure Voice-Chat-AI to use Kokoro:
129
-
- `KOKORO_BASE_URL=http://localhost:8880/v1` to your `.env` file
130
-
- Set `TTS_PROVIDER=kokoro` in your `.env` file
131
-
- Select a voice with `KOKORO_TTS_VOICE=af_bella` (female) or `KOKORO_TTS_VOICE=am_onyx` (male)
129
+
- `KOKORO_BASE_URL=http://localhost:8880/v1`- setto your url
130
+
- Set `TTS_PROVIDER=kokoro`- use it as the TTS_PROVIDER in.env or selectin UI.
131
+
- Select a voice with `KOKORO_TTS_VOICE=af_bella` (female) or `KOKORO_TTS_VOICE=am_onyx` (male) - defaults to use in .env, all voices will show in UI.
132
132
133
133
2. Start the Voice Chat AI application normally
134
134
135
-
Kokoro TTS operates locally on your machine, requiring no API key or internet connection once installed. The server supports GPU acceleration for faster processing if you have compatible NVIDIA hardware.
135
+
Kokoro TTS operates locally on your machine or local network, requiring no API key or internet connection once installed. The server supports GPU acceleration for faster processing if you have compatible NVIDIA hardware.
136
136
137
137
## Usage
138
138
@@ -352,8 +352,8 @@ docker run -d --gpus all -e "PULSE_SERVER=/mnt/wslg/PulseServer" -v \\wsl$\Ubunt
352
352
353
353
```env
354
354
# Conditional API Usage:
355
+
# Depending on the value of MODEL_PROVIDER, the corresponding service will be used when run.
355
356
# You can mix and match; use local Ollama with OpenAI speech or use OpenAI model with local XTTS, etc.
356
-
# If not using certain providers just leave defaults as is and don't select it in the UI.
357
357
358
358
# Model Provider: openai or ollama or xai or anthropic
359
359
MODEL_PROVIDER=openai
@@ -366,7 +366,7 @@ MODEL_PROVIDER=openai
366
366
CHARACTER_NAME=bigfoot
367
367
368
368
# Text-to-Speech (TTS) Configuration:
369
-
# TTS Provider - Options: xtts (local uses the custom character .wav) or openai (uses OpenAI TTS voice) or elevenlabs or kokoro
369
+
# TTS Provider - Options: xtts (local uses the custom character .wav) or openai (uses OpenAI TTS voice) or elevenlabs or kokoro (your own selfhosted tts)
370
370
TTS_PROVIDER=openai
371
371
372
372
# Voice Speed for all TTS providers - 0.7 to 1.2, default is 1.0
# See the kokoro web url ( if you have it installed ) for more voices http://localhost:8880/web/
399
400
KOKORO_TTS_VOICE=af_bella
400
401
401
402
# AUDIO GENERATION LENGTH
402
403
# Maximum character length for audio generation - set to 2000+ for stories and games, 3000 for assassin story, 4000 for mars encounter interactive
403
-
# MAX_CHAR_LENGTH is used for openaiand elevenlabs, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider
404
+
# MAX_CHAR_LENGTH is used for openai, elevenlabs and kokoro, is also used for max tokens for chat response, if MAX_CHAR_LENGTH is 500, then 500 * 4 // 3 = 666 max tokens is sent to provider
404
405
MAX_CHAR_LENGTH=1000
405
406
# XTTS Max Number of characters to generate audio, default is 255 but we are overriding that
0 commit comments