🚀 indri-0.1-350m-tts 语音合成模型
Indri 是一系列能够进行文本转语音(TTS)、自动语音识别(ASR)和音频续写的音频模型。本模型是该系列中的中等规模(3.5 亿参数)模型,支持两种语言的 TTS 任务:英语和印地语。
项目链接
🚀 快速开始
🤗 使用 pipelines 快速上手
使用以下代码开始使用该模型。Pipelines 是使用该模型的最佳方式。
import torch
import torchaudio
from transformers import pipeline
model_id = '11mlabs/indri-0.1-350m-tts'
task = 'indri-tts'
pipe = pipeline(
task,
model=model_id,
device=torch.device('cuda:0' ),
trust_remote_code=True
)
output = pipe(['Hi, my name is Indri and I like to talk.' ], speaker = '[spkr_63]' )
torchaudio.save('output.wav' , output[0 ]['audio' ][0 ], sample_rate=24000 )
可用的说话人
说话人 ID
说话人名称
[spkr_63]
🇬🇧 👨 书籍朗读者
[spkr_67]
🇺🇸 👨 网红
[spkr_68]
🇮🇳 👨 书籍朗读者
[spkr_69]
🇮🇳 👨 书籍朗读者
[spkr_70]
🇮🇳 👨 励志演讲者
[spkr_62]
🇮🇳 👨 重度书籍朗读者
[spkr_53]
🇮🇳 👩 食谱朗诵者
[spkr_60]
🇮🇳 👩 书籍朗读者
[spkr_74]
🇺🇸 👨 书籍朗读者
[spkr_75]
🇮🇳 👨 企业家
[spkr_76]
🇬🇧 👨 自然爱好者
[spkr_77]
🇮🇳 👨 网红
[spkr_66]
🇮🇳 👨 政治家
自托管服务
git clone https://github.com/cmeraki/indri.git
cd indri
pip install -r requirements.txt
sudo apt update -y
sudo apt upgrade -y
sudo apt install ffmpeg -y
python -m inference --model_path 11mlabs/indri-0.1-350m-tts --device cuda:0 --port 8000
✨ 主要特性
小巧轻便 :基于 GPT - 2 中等架构,该方法可扩展到任何基于自回归变压器的架构。
超快速 :使用我们的自托管服务选项 ,在 RTX6000Ada NVIDIA GPU 上,模型速度可达每秒 300 个令牌(每秒生成 3 秒音频),且首令牌生成时间低于 20 毫秒。
高并发 :在 RTX6000Ada 上,可支持约 300 个序列的批量处理,全上下文长度为 1024 个令牌。
语音克隆 :支持使用短提示(<5 秒)进行语音克隆。
多语言混合 :支持英语和印地语的代码混合文本输入。
📦 安装指南
克隆仓库
git clone https://github.com/cmeraki/indri.git
cd indri
安装依赖
pip install -r requirements.txt
安装 ffmpeg
sudo apt update -y
sudo apt upgrade -y
sudo apt install ffmpeg -y
💻 使用示例
基础用法
import torch
import torchaudio
from transformers import pipeline
model_id = '11mlabs/indri-0.1-350m-tts'
task = 'indri-tts'
pipe = pipeline(
task,
model=model_id,
device=torch.device('cuda:0' ),
trust_remote_code=True
)
output = pipe(['Hi, my name is Indri and I like to talk.' ], speaker = '[spkr_63]' )
torchaudio.save('output.wav' , output[0 ]['audio' ][0 ], sample_rate=24000 )
📚 详细文档
模型详情
模型描述
indri - 0.1 - 350m - tts
是一个基于变压器架构的新型超小型轻量级 TTS 模型。它将音频建模为令牌,并能生成高质量音频,同时能一致地克隆说话人的风格。
示例音频
文本
示例音频
मित्रों, हम आज एक नया छोटा और शक्तिशाली मॉडल रिलीज कर रहे हैं।
भाइयों और बहनों, ये हमारा सौभाग्य है कि हम सब मिलकर इस महान देश को नई ऊंचाइयों पर ले जाने का सपना देख रहे हैं।
Hello दोस्तों, future of speech technology mein अपका स्वागत है
In this model zoo, a new model called Indri has appeared.
详细信息
属性
详情
模型类型
基于 GPT - 2 的语言模型
规模
3.5 亿参数
支持语言
英语、印地语
许可证
此模型不可用于商业用途,仅用于研究展示。
🔧 技术细节
该模型的工作原理如下:
将输入文本转换为令牌。
在基于 GPT - 2 的变压器模型上运行自回归解码,生成音频令牌。
将音频令牌(使用 Kyutai/mimi )解码为音频。
更多关于该模型构建的技术细节,请阅读我们的博客此处 。
📄 许可证
本模型采用 cc - by - sa - 4.0 许可证,且不可用于商业用途,仅用于研究展示。
引用信息
如果您在研究中使用了此模型,请引用:
@misc{indri-multimodal-alm,
author = {11mlabs},
title = {Indri: Multimodal audio language model},
year = {2024},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/cmeraki/indri}},
email = {compute@merakilabs.com}
}
相关 BibTex 引用
nanoGPT
@techreport{kyutai2024moshi,
title={Moshi: a speech-text foundation model for real-time dialogue},
author={Alexandre D\'efossez and Laurent Mazar\'e and Manu Orsini and
Am\'elie Royer and Patrick P\'erez and Herv\'e J\'egou and Edouard Grave and Neil Zeghidour},
year={2024},
eprint={2410.00037},
archivePrefix={arXiv},
primaryClass={eess.AS},
url={https://arxiv.org/abs/2410.00037},
}
Whisper
@misc{radford2022whisper,
doi = {10.48550/ARXIV.2212.04356},
url = {https://arxiv.org/abs/2212.04356},
author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
title = {Robust Speech Recognition via Large-Scale Weak Supervision},
publisher = {arXiv},
year = {2022},
copyright = {arXiv.org perpetual, non-exclusive license}
}
silero-vad
@misc{Silero VAD,
author = {Silero Team},
title = {Silero VAD: pre-trained enterprise-grade Voice Activity Detector (VAD), Number Detector and Language Classifier},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/snakers4/silero-vad}},
commit = {insert_some_commit_here},
email = {hello@silero.ai}
}