Microphone support for the encodec example. (#1866)

This commit is contained in:
Laurent Mazare
2024-03-18 11:19:46 +01:00
committed by GitHub
parent d365ef32d9
commit 58605252e8
2 changed files with 31 additions and 7 deletions

View File

@ -13,9 +13,13 @@ cargo run --example encodec --features symphonia --release -- code-to-audio \
```
This decodes the EnCodec tokens stored in `jfk-codes.safetensors` and generates
an output wav file containing the audio data. If the output file name is set to
`-`, the audio content directly gets played on the computer speakers if any.
an output wav file containing the audio data.
Instead of `code-to-audio` one can use:
- `audio-to-audio in.mp3 out.wav`: encodes the input audio file then decodes it to a wav file.
- `audio-to-code in.mp3 out.safetensors`: generates a safetensors file
containing EnCodec tokens for the input audio file.
If the audio output file name is set to `-`, the audio content directly gets
played on default audio output device. If the audio input file is set to `-`, the audio
gets recorded from the default audio input.