Skip to content

Fix audio format - #2159

Merged
LauraGPT merged 5 commits into
modelscope:mainfrom
Djraemon:fix-audio-format
Oct 21, 2024
Merged

LauraGPT merged 5 commits into
modelscope:mainfrom
Djraemon:fix-audio-format

Conversation

@Djraemon

Copy link
Copy Markdown
Contributor

运行runtime/python/onnxruntime/demo_sencevoice_small.py文件时发现了无法处理mp3文件的缺陷。现已改进runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py文件中SenseVoiceSmall类的load_data函数,增加了对音频文件文件后缀名的检查。

实现功能:检查文件后缀名,如果后缀名不是.wav,则将该非wav格式的文件转化为wav格式。

目前仅对runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py做了修改,后续可以给其他几个模型增加同样的补丁。
诚望采纳!

@LauraGPT
LauraGPT merged commit a76f15c into modelscope:main Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants