Improve the encodec example: handle resampling. (#1865)

* Improve the encodec example: handle resampling.

* Play the audio directly.
This commit is contained in:
Laurent Mazare
2024-03-18 10:09:40 +01:00
committed by GitHub
parent 754fa1e813
commit d365ef32d9
4 changed files with 309 additions and 64 deletions

View File

@ -27,6 +27,7 @@ intel-mkl-src = { workspace = true, optional = true }
num-traits = { workspace = true }
pyo3 = { version = "0.20.0", features = ["auto-initialize"], optional = true }
rayon = { workspace = true }
rubato = { version = "0.15.0", optional = true }
safetensors = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
@ -63,6 +64,7 @@ nccl = ["cuda", "cudarc/nccl", "dep:half"]
onnx = ["candle-onnx"]
metal = ["candle/metal", "candle-nn/metal"]
microphone = ["cpal"]
encodec = ["cpal", "symphonia", "rubato"]
[[example]]
name = "llama_multiprocess"
@ -98,6 +100,4 @@ required-features = ["candle-datasets"]
[[example]]
name = "encodec"
required-features = ["symphonia"]
required-features = ["encodec"]