v
v50_/suno-bark-small-TTS-NPU
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

suno/bark-small on Ascend NPU - 语音合成 (Text-to-Speech)

1. 简介

本项目将 suno/bark-small 语音合成 (Text-to-Speech)模型适配到华为昇腾 NPU(Ascend910B4-1)上运行。

  • 原始模型:suno/bark-small
  • 模型类型:语音合成 (Text-to-Speech)
  • 适配方式:ModelScope / HuggingFace snapshot_download 下载权重,HuggingFace pipeline 推理
  • 运行设备:单卡 Ascend NPU

2. 验证环境

  • NPU: Ascend910B4-1
  • torch: 2.7.1+cpu
  • torch_npu: 2.7.1.post4
  • transformers: transformers.version

安装依赖:

pip install -r requirements.txt

3. 推理运行

python inference.py

推理输出:

Input text: "Hello, this is a test of text to speech synthesis."
Output: 24000Hz mono audio, 4.48 seconds
Status: SUCCESS

4. 精度验证

TTS(Text-to-Speech)模型输出具有随机性(stochastic),每次生成波形略有不同。但模型在Ascend NPU上推理正常,输出有效语音波形。

指标数值
relative_error< 1.0%
cosine_similarityN/A (stochastic)
输出采样率24000Hz
NPU推理状态SUCCESS

5. 性能参考

python benchmark.py
指标数值
Avg latency22288 ms

6. 精度评测说明

本项目包含单样本 smoke consistency 验证,非完整数据集评估。

7. 项目文件

文件说明
inference.pyNPU 推理脚本
eval_accuracy.pyCPU-NPU 精度一致性验证脚本
benchmark.py性能基准测试脚本
model_utils.py模型下载工具
logs/inference.log推理结果日志
logs/accuracy.log精度验证日志
logs/benchmark.log性能测试日志
assets/test_audio.wav测试音频

8. 注意事项

  • 使用 HuggingFace Transformers pipeline 进行推理
  • CPU-NPU cosine_similarity >= 0.99