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

用谷歌转语音报错--code": 400, "message": "Specify FLAC encoding to match audio file.", "status": "INVALID_ARGUMENT" #47

Open
michael7908 opened this issue May 16, 2022 · 4 comments

Comments

@michael7908
Copy link

实测结果
1)用GCP(在设置页面,测试配置显示“正确”)语音转文字时,如果视频语言是中文或日文,报错讯息如下:
code": 400, "message": "Specify FLAC encoding to match audio file.", "status": "INVALID_ARGUMENT"

2)转英文没有问题,正常出字幕。

还请解决,谢谢开发者!

@1c7
Copy link
Owner

1c7 commented May 16, 2022

收到。
根据报错信息的猜测:你扔进去的文件可能是 .flac 后缀?然后我代码里面对 Flac 格式的处理没有指定一个 FLAC encoding。
总之下个版本里我会修复~~ 不好意思

@michael7908
Copy link
Author

感谢郑先生如此及时的回复。我扔进去的都是MKV格式,不是flac后缀。我可以先试试转换格式。谢谢。

@michael7908
Copy link
Author

Update: 扔进去wmv格式的中文视频,没有问题。

@1c7
Copy link
Owner

1c7 commented May 16, 2022

好。
我觉得是 mkv 里面封装的音频是 flac,然后我的程序判断到是 flac 就直传了(就不转换格式了)
可能是这个原因(这些技术解释无所谓了)
反正对你具体使用而言。遇到类似的问题就找个工具把音频转个码,我觉得 mp3 应该可以,然后直接扔进软件里。

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

No branches or pull requests

2 participants