Views
No views yet
mlx-speech, without a PyTorch
runtime at inference time.fishaudio/s2-proconfig.jsonmodel.safetensorscodec-mlx/config.jsoncodec-mlx/model.safetensorscodec-mlx/ directory to decode model
codes into waveform output.1python scripts/generate/fish_s2_pro.py \
2 --text "Hello from Fish S2 Pro." \
3 --model-dir /path/to/fishaudio-s2-pro-8bit-mlx \
4 --output outputs/fish_s2_pro.wav1python scripts/generate/fish_s2_pro.py \
2 --text "This is a cloned voice." \
3 --reference-audio /path/to/reference.wav \
4 --reference-text "Transcript of the reference audio." \
5 --model-dir /path/to/fishaudio-s2-pro-8bit-mlx \
6 --output outputs/fish_s2_pro_clone.wav[tag] — no closing tag. Place them immediately before the
word or phrase they apply to.1python scripts/generate/fish_s2_pro.py \
2 --text "Now Bobby, [clearing throat] I need to talk to you. [whisper] This stays between us. [chuckle] Just kidding." \
3 --reference-audio /path/to/reference.wav \
4 --reference-text "Transcript of the reference audio." \
5 --output outputs/fish_s2_pro_emotion.wav[whisper], [chuckle], [laugh], [clearing throat],
[excited], [sad], [pause]. See the upstream repo for the full tag list.1from pathlib import Path
2
3from mlx_speech.generation.fish_s2_pro import generate_fish_s2_pro
4
5result = generate_fish_s2_pro(
6 "Hello from Fish S2 Pro.",
7 model_dir=Path("/path/to/fishaudio-s2-pro-8bit-mlx"),
8)fishaudio/s2-pro.