HuggingFace镜像/silma-tts
模型介绍
文件和版本
分析

SILMA TTS:轻量级开源双语语音合成模型

GitHub Pages hfspace

SILMA TTS v1 是由 SILMA AI 开发的高性能 1.5 亿参数双语(阿拉伯语/英语)语音合成模型。该模型基于前沿的 F5-TTS 扩散架构构建,并使用数万小时高质量公开及专有数据从零开始预训练。为回馈社区,SILMA TTS 采用高度宽松的许可证发布,使科研和商业场景均可便捷地使用领先的语音合成技术。

如需了解我们的商业 TTS 模型,请访问以下页面: https://silma.ai/arabic-text-to-speech

模型详情

特性说明
高保真音频卓越的语音合成能力,输出音质出众
1.5 亿参数轻量高效,适用于低资源环境
即时语音克隆仅需不到 8 秒的参考音频即可克隆任意声音
超低延迟针对实时应用优化,RTF 约 0.12(RTX 4090 GPU)
阿拉伯语与英语双语支持阿拉伯语标准语(Fusha/MSA)及英语均达到母语级流畅度
高级阿拉伯语变音符号处理完整支持 Tashkeel,确保发音精准且符合语境
文本规范化基于 NeMo Text Processing 实现
商业友好许可基于 Apache 2.0 许可证完全开源

安装

使用 pip

# make sure ffmpeg is installed
apt-get update && apt install ffmpeg -y

# create and activate the environment
python -m venv silma-tts-env
source silma-tts-env/bin/activate

# install silma-tts library
pip install silma-tts

从源码构建

# make sure ffmpeg is installed
apt-get update && apt install ffmpeg -y

# create and activate the environment
python -m venv silma-tts-env
source silma-tts-env/bin/activate

# clone repo and install
git clone https://github.com/SILMA-AI/silma-tts.git
cd silma-tts
pip install -e .

使用与推理

使用 Gradio 应用

# Run the following command
silma-tts-app

然后打开以下浏览器链接 http://127.0.0.1:7860/

使用 Python 进行推理

import time
from silma_tts.api import SilmaTTS

silma_tts = SilmaTTS()

## the voice/style you want to clone
reference_audio_file = "/root/silma-tts/src/silma_tts/infer/ref_audio_samples/ar.ref.24k.wav"
## the transcription of the reference_audio_file
reference_audio_text = "ويدقق النظر في القرآن الكريم وسائر الكتب السماوية ويتبع مسالك الرسل العظام عليهم الصلاة والسلام."

time_start = time.time()

wav, sr, spec = silma_tts.infer(
    ref_file=reference_audio_file,
    ref_text=reference_audio_text, # can also be left None - will be transcribed on the fly
    gen_text="""
    أنا نموذج جديد من سلمى لتحويل النص إلى كلام، يمكنني التحدث باللغة العربية مع أو بدون علامات التشكيل.
    I am the new SILMA model for converting text to speech, I can speak Arabic with or without diacritics.
    """.strip(),
    file_wave=str("generated_audio.wav"),
    seed=None,
    speed=1
)

time_end = time.time()
print(f"Time elapsed:{(time_end-time_start):.2f} seconds")

## Note 1: generated audio file (generated_audio.wav) will be saved in the current directory
## Note 2: You can also use the "wav" variable (raw waveform) to play the audio or return it via API

你也可以直接使用以下命令运行上面的示例,但前提是你从源码安装的:

python src/silma_tts/infer/example.py

训练

我们的模型与 F5-TTS v1.1.7 完全兼容。这意味着你可以充分利用 F5-TTS 项目中所有优秀的资源、工具和社区经验。

步骤

## clone F5-TTS v1.1.7
cd /root
git clone --depth 1  --branch 1.1.7 https://github.com/SWivid/F5-TTS.git
cd F5-TTS
pip install -e .

## download silma-tts model weights, vocab.txt, patched finetuning script and config.yaml
hf download silma-ai/silma-tts  --local-dir /root/silma-tts-v1-weights

## create the project, then replace the default configuration, vocabulary, and fine-tuning Python file. Note that the patched finetune_cli.py overrides the F5TTS_v1_Base config with the silma-tts model config.
mkdir /root/F5-TTS/data/finetuning_project_char
cp /root/silma-tts-v1-weights/vocab.txt /root/F5-TTS/data/finetuning_project_char
cp /root/silma-tts-v1-weights/finetune_cli.py /root/F5-TTS/src/f5_tts/train/finetune_cli.py
echo /root/silma-tts-v1-weights/config.yaml > /root/F5-TTS/src/f5_tts/configs/F5TTS_v1_Base.yaml



## open F5-TTS UI training pipeline 
f5-tts_finetune-gradio --port 7860 --host 0.0.0.0

## After preparing your data: go to "Train Model" tab -> "Path to the Pretrained Checkpoint" and enter the path to the silma-tts model weights file: /root/silma-tts-v1-weights/model.pt while leaving "Tokenizer File" empty

## For more information please follow the F5-TTS training guide below
## https://github.com/SWivid/F5-TTS/tree/main/src/f5_tts/train

摘要:你需要使用 F5-TTS v1.1.7 的训练代码,但需配合我们的配置文件、词表、修改后的微调脚本以及我们的预训练权重。

致谢

本仓库直接建立在 F5-TTS 项目所奠定的优秀基础之上。核心架构和大部分代码均源自其工作。我们的贡献在于引入了新的预训练权重,并对推理代码进行了显著优化。

其他项目

  1. 我们使用 CATT 为阿拉伯语文本补充 Tashkeel 标记,以处理文本中未包含 Tashkeel 的情况。
  2. 我们使用 NeMo-text-processing 进行文本归一化处理。

引用

@article{silma-tts-v1,
  title   = {SILMA TTS: A Lightweight Open Bilingual Text to Speech Model},
  author  = {SILMA AI},
  year    = {2026},
  url     = {https://github.com/SILMA-AI/silma-tts}
}

许可证

  1. 代码:MIT License
  2. 模型权重:Apache-2.0 License

免责声明

请负责任地使用本模型。 使用本声音克隆功能即表示您同意遵守以下规则:

  • 获得授权: 仅在获得说话人明确且有书面记录的许可后,方可克隆其声音。
  • 不得恶意或欺诈: 不得利用克隆声音实施欺骗、诈骗、骚扰或诽谤他人。
  • 不得传播虚假信息: 不得利用深度伪造技术散布假新闻或操纵舆论。
  • 保持透明: 分享时务必明确标注该音频为 AI 生成。

注意: 您对所生成的音频承担全部责任。滥用本技术可能导致严重的法律后果,包括但不限于欺诈、诽谤或侵犯肖像权。