From 2a602ce8762ed0346f3af90ab9297a41eee40ad3 Mon Sep 17 00:00:00 2001 From: Martin Camacho Date: Thu, 20 Apr 2023 14:41:21 -0700 Subject: [PATCH] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 63ef930..8006e3d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,15 @@ Audio(audio_array, rate=SAMPLE_RATE) [pizza.webm](https://user-images.githubusercontent.com/5068315/230490503-417e688d-5115-4eee-9550-b46a2b465ee3.webm) + +To save `audio_array` as a WAV file: + +```python +from scipy.io.wavfile import write as write_wav + +write_wav("/path/to/audio.wav", SAMPLE_RATE, audio_array) +``` + ### 🌎 Foreign Language Bark supports various languages out-of-the-box and automatically determines language from input text. When prompted with code-switched text, Bark will even attempt to employ the native accent for the respective languages in the same voice.