Skip to main content

语音评测工具集:ASR/TTS/SVS 常用评估指标

Project description

Speech-Eval

语音评测工具集,汇总了 ASR(自动语音识别)、TTS(语音合成)、SVS(歌声合成)等语音任务中常用的评估指标计算代码。

安装

pip install speech-eval

# 含 SpeechBERTScore / SpeechBLEU 支持(需要 PyTorch)
pip install speech-eval[bert]

支持的指标

指标 模块 说明 方向
WER asr 词错误率 越低越好
CER asr 字错误率 越低越好
MCD tts 梅尔倒谱距离 越低越好
Log-F0 RMSE tts 对数基频误差 越低越好
SpeechBERTScore tts 语音语义相似度 越高越好
SpeechBLEU tts 语音离散token BLEU分数 越高越好
VUV Error common 清浊音分类错误率 越低越好
Semitone ACC svs 半音准确率 越高越好

快速开始

# ASR
from speech_eval.asr import compute_wer, compute_cer
wer = compute_wer("the cat sat on the mat", "the cat sit on a mat")
cer = compute_cer("今天天气很好", "今天气很好")

# TTS
from speech_eval.tts import compute_mcd_pair, compute_f0_rmse_pair
mcd = compute_mcd_pair("gen.wav", "gt.wav")
f0_rmse = compute_f0_rmse_pair("gen.wav", "gt.wav")

# SVS
from speech_eval.svs import compute_semitone_acc_pair
result = compute_semitone_acc_pair("gen_singing.wav", "gt_singing.wav")

# VUV Error (TTS/SVS 通用)
from speech_eval.common import compute_vuv_error_pair
result = compute_vuv_error_pair("gen.wav", "gt.wav")

项目结构

speech-eval/
├── pyproject.toml
├── README.md
├── LICENSE
├── speech_eval/
│   ├── __init__.py
│   ├── asr/            # WER, CER
│   ├── tts/            # MCD, F0 RMSE, SpeechBERTScore, SpeechBLEU
│   ├── svs/            # Semitone ACC
│   └── common/         # VUV Error (TTS/SVS 共享)
├── examples/           # 使用示例
└── docs/               # 各模块详细文档

文档

各模块的详细用法、API 文档和指标原理请参阅:

  • docs/asr.md — WER、CER 详细文档
  • docs/tts.md — MCD、F0 RMSE、SpeechBERTScore、SpeechBLEU、VUV Error 详细文档
  • docs/svs.md — Semitone ACC、VUV Error 详细文档

运行示例

pip install speech-eval
python examples/wer_demo.py
python examples/cer_demo.py
python examples/mcd_demo.py
python examples/f0_demo.py
python examples/semitone_demo.py
python examples/speech_bert_score_demo.py
python examples/vuv_demo.py

参考来源

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speech_eval-0.1.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speech_eval-0.1.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file speech_eval-0.1.0.tar.gz.

File metadata

  • Download URL: speech_eval-0.1.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for speech_eval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4bc6af1ff45e63c5f302fbaf100a936d7b33555e58bc48c7f240823c2139b811
MD5 ae2c5b955237ccd6221c36c076478c9c
BLAKE2b-256 344915a32d97ee0913305d908a8338a831af638e74aadae52801a1246a51ed4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for speech_eval-0.1.0.tar.gz:

Publisher: publish.yml on mahailiang5618/speech-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file speech_eval-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: speech_eval-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for speech_eval-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 864aef07f0634eb1373cc8a9223c3d85ff4bdc3f35b191564a6e0b8dc5d8a5f3
MD5 6207e5f80f50e5ab952ed87f73e58f0f
BLAKE2b-256 1ca151951a0b05b333d967c8ddfa3541a3000c26645f65cf2208fcce652707e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for speech_eval-0.1.0-py3-none-any.whl:

Publisher: publish.yml on mahailiang5618/speech-eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page