diff --git a/README.md b/README.md index a4e91a70..0404612f 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,14 @@ To generate audio with an LLM use: ```python from mlx_audio.tts.generate import generate_audio -# Example: Generate an audiobook chapter as audio +# Example: Generate an audiobook chapter as mp3 audio generate_audio( - text="In the beginning, the universe was created...", + text=("In the beginning, the universe was created...\n" + "...or the simulation was booted up."), model_path="prince-canuma/Kokoro-82M", voice="af_heart", speed=1.2, - lang_code="en", + lang_code="a", # Kokoro: (a)f_heart, or comment out for auto file_prefix="audiobook_chapter1", audio_format="wav", sample_rate=24000, diff --git a/mlx_audio/tts/models/kokoro/kokoro.py b/mlx_audio/tts/models/kokoro/kokoro.py index f4aca8ca..0d9e906d 100644 --- a/mlx_audio/tts/models/kokoro/kokoro.py +++ b/mlx_audio/tts/models/kokoro/kokoro.py @@ -246,7 +246,7 @@ def generate( text: str, voice: str = None, speed: float = 1.0, - lang_code: str = "af", + lang_code: str = "a", split_pattern: str = r"\n+", **kwargs, ):