Fish Audio S2 Pro / Drama 3
此 Soniqo 页面记录本地 speech-swift / speech-core 实现中的 Fish Audio S2 Pro。Hugging Face 包链接放在集成说明之后。
首页卡片和文档菜单先指向这里;源模型和权重包链接仍在本页提供。
概览
| 模型 | Fish Audio S2 Pro |
|---|---|
| 用途 | Experimental multilingual TTS with raw-reference cloning and style markers |
| 后端 | MLX fp16 |
| 输出 | 44.1 kHz mono PCM |
| 语言 | Multilingual |
| 许可证 | Research / non-commercial bundle; obtain Fish Audio license for commercial exposure |
| 状态 | Programmatic runtime; CLI integration is still pending |
| 来源 | Fish Audio S2 Pro |
| Swift 产品 | FishAudioTTS |
| CLI / 运行时 | Programmatic runtime today; planned speech speak --engine fish-audio |
使用
下面的片段对应当前 speech-swift 仓库暴露的 API 或命令。
import FishAudioTTS
let model = try await FishAudioTTSModel.fromPretrained()
let pcm = try await model.generate(
text: "आज मैं बहुत खुश हूँ। [excited]",
referenceAudioURL: URL(fileURLWithPath: "reference.wav"),
referenceText: "नमस्ते, यह संदर्भ आवाज है।"
)
模型链接
实现说明
- Download uses the newer explicit byte-weighted file manifest, so progress reflects real transferred bytes across the multi-GB shards.
- Control markers include [pause], [emphasis], [laughing], [excited], [angry], [whisper], [screaming], [shouting], [surprised], and [sad].
- The runtime generates 10 DAC codebook rows, then decodes generated or reference-conditioned codebooks through FishAudioCodec.
- Current tests cover bundle loading, codebook generation, codec encode/decode, Hindi cloning, and ASR round-trip gates.
Fish Audio Drama 3
Drama 3 的实验性原生 MLX 支持通过 FishAudioDrama3Model 提供。350 亿参数的混合注意力 MoE 主干、时序音频解码塔和 Fish DAC 编解码器输出 44.1 kHz 单声道音频。4 位检查点已在 Apple M5 Pro 上通过纯文本生成、参考语音克隆和 CLI 输出的波形及独立 ASR 验证。8 位和 BF16 版本尚未验证。
默认 balanced 模式会在阶段边界修剪超过 512 MiB 的空闲 MLX 缓冲区。模型生命周期内还应用共享缓存上限,并保留调用方的更低预算;两者都不限制进程总内存。--fish-drama3-memory-mode unrestricted 或 memoryOptions: .unrestricted 会提前加载权重并跳过阶段修剪,但仍保留生命周期上限。
纯文本生成会延迟加载 794.4 MiB 的参考音频编码器权重。首次编码参考音频时加载并保留这些权重,因此在此之前请保留 codec.safetensors。预先计算的参考编码无需编码器。
请提供完整文本。语音克隆需要参考录音及其准确转录。支持 0–15 号说话人标签和内联情感控制。可通过 generateStreaming、generateStream 和 --stream 获取 PCM 流式输出。默认每块 3 个编解码帧,约 139 毫秒音频。尚不支持长文本自动分块和流式文本输入。达到帧数上限时会抛出错误。
speech speak "Hello from Drama 3." --engine fish-drama3 --fish-drama3-bundle-dir /path/to/bundle -o hello.wav
speech speak "Hello from Drama 3." --engine fish-drama3 --stream --fish-drama3-chunk-frames 3 -o streamed.wav
speech speak "Hello in the reference voice." --engine fish-drama3 --voice-sample reference.wav --fish-drama3-reference-text "The exact reference transcript." --seed 42 -o cloned.wavimport FishAudioTTS
let model = try await FishAudioDrama3Model.fromBundle(bundleURL, memoryOptions: .balanced)
let pcm = try await model.generate(text: "Hello from Drama 3.", options: .init(seed: 42))
try await model.generateStreaming(text: "Hello from Drama 3.", options: .init(seed: 42, streamingChunkFrames: 3)) { chunk in
print(chunk.frameIndex, chunk.samples.count, chunk.isFinal)
}| 选项 | 默认值 |
|---|---|
--fish-drama3-model-id | mlx-community/fish-audio-drama-3-4bit |
--fish-drama3-bundle-dir | — |
--fish-drama3-reference-text | — |
--fish-drama3-max-frames | 2048 |
--fish-drama3-temperature | 1 |
--fish-drama3-top-k | 30 |
--fish-drama3-top-p | 0.9 |
--voice-sample | — |
--seed | 0 |
--stream | false |
--fish-drama3-chunk-frames | 3 |
--fish-drama3-memory-mode | balanced |
基于 Fish Audio 构建。模型包保留社区许可证和 NOTICE。
4 位性能测试
| 模式 | 首个 PCM,毫秒 | 预热后合成,秒 | 音频,秒 | RTF | 峰值 RSS,GiB | 峰值物理内存,GiB |
|---|---|---|---|---|---|---|
| 纯文本 / 完整波形 | — | 2.306 | 3.483 | 0.662 | 14.457 | 24.220 |
| 参考语音克隆 / 完整波形 | — | 2.681 | 3.204 | 0.837 | 15.064 | 24.789 |
| 纯文本 / 流式输出 | 275.3 | 2.529 | 3.483 | 0.726 | 15.571 | 22.321 |
| 参考语音克隆 / 流式输出 | 730.2 | 2.860 | 3.204 | 0.893 | 14.676 | 23.885 |
Apple M5 Pro,48 GiB,发布构建,2026-10-17。数据为三次预热后完整波形生成的中位数,不包含模型加载和 WAV 文件读写;克隆每次均包含参考音频编码。RTF = 合成时长 / 音频时长。独立 ASR:16/16 段通过,词错误数为零。统一内存容量规划应参考物理内存占用。 首个 PCM 指首次收到非空流式音频块;完整波形模式没有分块回调。默认每块包含 139.3 毫秒音频。未测量实际播放起始时间。