mirror of
https://github.com/kyutai-labs/delayed-streams-modeling.git
synced 2025-12-23 03:19:57 +00:00
Add Rust server usage example (#32)
* Run Ruff on tts_mlx.py * Add tts_rust_server.py example * Remove unused HF repo arguments and reset audio output data in TTS server script
This commit is contained in:
30
README.md
30
README.md
@@ -239,7 +239,35 @@ and just prefix the command above with `uvx --with moshi`.
|
||||
<details>
|
||||
<summary>Rust server</summary>
|
||||
|
||||
Example coming soon.
|
||||
|
||||
The Rust implementation provides a server that can process multiple streaming
|
||||
queries in parallel.
|
||||
|
||||
In order to run the server, install the [moshi-server
|
||||
crate](https://crates.io/crates/moshi-server) via the following command. The
|
||||
server code can be found in the
|
||||
[kyutai-labs/moshi](https://github.com/kyutai-labs/moshi/tree/main/rust/moshi-server)
|
||||
repository.
|
||||
```bash
|
||||
cargo install --features cuda moshi-server
|
||||
```
|
||||
|
||||
|
||||
Then the server can be started via the following command using the config file
|
||||
from this repository.
|
||||
|
||||
```bash
|
||||
moshi-server worker --config configs/config-tts.toml
|
||||
```
|
||||
|
||||
Once the server has started you can connect to it using our script as follows:
|
||||
```bash
|
||||
# From stdin, plays audio immediately
|
||||
echo "Hey, how are you?" | python scripts/tts_rust_server.py - -
|
||||
|
||||
# From text file to audio file
|
||||
python scripts/tts_rust_server.py text_to_say.txt audio_output.wav
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
Reference in New Issue
Block a user