Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DartApi使用whisper模型翻译中文音频报错 #1104

Open
JackWSK opened this issue Jul 10, 2024 · 1 comment · Fixed by #1106
Open

DartApi使用whisper模型翻译中文音频报错 #1104

JackWSK opened this issue Jul 10, 2024 · 1 comment · Fixed by #1106

Comments

@JackWSK
Copy link

JackWSK commented Jul 10, 2024

其他模型正常,只有whisper翻译该音频出问题
使用的参数条件
1.使用dart-examples中./run-whisper脚本
2.音频response10.wav.zip
最后发生错误
FormatException: Missing extension byte (at offset 245)

经过断点后发现,得到的length为544,发生报错。出错点为
54aeec49ba136527347c67719e0bb13a
67ffcefb7fa2e513e35e6e2b4584be51

我尝试将sdk中的代码utf8.decode(xxx) 改成 utf8.decode(xxx, allowMalformed=true) 此时顺利通过。
f2ba57866ebd75fcd2845b86bf8a436b

不过该代码在sdk中,这个报错估计whisper给了invalid utf8。大佬们看看怎么解决一下。另外能否支持一下whisper的initialPropmt参数。因为翻译的时候给了繁体中文。资料说要给initialPrompt才行。
742f61647e07773f466415f6cc991bd8

@csukuangfj
Copy link
Collaborator

另外能否支持一下whisper的initialPropmt参数。因为翻译的时候给了繁体中文。资料说要给initialPrompt才行。

后面再单独开个 PR 解决这个.

先记下来,参考资料为 https://wulu.zone/posts/whisper-cn

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 a pull request may close this issue.

2 participants