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

讯飞api调用超时 #197

Open
samulenzz opened this issue Jan 9, 2023 · 0 comments
Open

讯飞api调用超时 #197

samulenzz opened this issue Jan 9, 2023 · 0 comments

Comments

@samulenzz
Copy link

确保你已经看过 readme,也搜索并阅读过和你遇到的情况相关的问题。否则会被认为是重复的并被立刻关闭。

描述问题
讯飞api调用超时

复现问题
复现问题的步骤:

  • 你使用的命令行参数。推荐使用以下的代码块markdown语法,将代码块复制到```和```之间即可。
autosub -sapi xfyun -i "/media/huabing/Data/RawCodes/682.mp4" -sconf /media/huabing/Data/RawCodes/xunfei.json
  • 一份完整的autosub命令行输出。你可以使用Ctrl-ACtrl-C去复制所有输出。
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
Translation destination language not provided. Only performing speech recognition.
Override "-of"/"--output-files" due to your args too few.
Output source subtitles file only.

Convert source file to "/tmp/tmpxe4wr4mf.wav" to detect audio regions.
/usr/bin/ffmpeg -hide_banner -y -i "/media/huabing/Data/RawCodes/nizz/682.mp4" -vn -ac 1 -ar 48000 -loglevel error "/tmp/tmpxe4wr4mf.wav"

Use ffprobe to check conversion result.
/usr/bin/ffprobe "/tmp/tmpxe4wr4mf.wav" -show_format -pretty -loglevel quiet
[FORMAT]
filename=/tmp/tmpxe4wr4mf.wav
nb_streams=1
nb_programs=0
format_name=wav
format_long_name=WAV / WAVE (Waveform Audio)
start_time=N/A
duration=3:56:08.213333
size=1.266737 Gibyte
bit_rate=768 Kbit/s
probe_score=99
TAG:encoder=Lavf58.29.100
[/FORMAT]

Conversion completed.
Use Auditok to detect speech regions.
Auditok detection completed.
"/tmp/tmpxe4wr4mf.wav" has been deleted.

Converting speech regions to short-term fragments.
Converting: 100% |####################################################################################################################################################| Time:  0:00:45

Sending short-term fragments to Xun Fei Yun WebSocket API and getting result.
Speech-to-Text: 100% |################################################################################################################################################| Time:  0:02:09
Receive something unexpected:
[Errno 110] Connection timed out
Error: Speech-to-text failed.
All work done.
  • 如果使用了config文件,请附上config文件,但注意去掉与账号有关的信息。
{
"app_id": "xxxx",
"api_secret": "xxxx",
"api_key": "xxxx",
"api_address": "iat-niche-api.xfyun.cn",
"business": {
    "language": "ja_jp",
    "domain": "iat",
    "accent": "mandarin"
}
}
  • 等等

期待的行为
期望调用讯飞api,不知道哪里出问题,超时了。

截图
合适的话可以提供用以描述问题的截图。但是不推荐用截图来展示命令行输出,除非你真的认为这很有必要。

操作环境(请提供以下完整数据):

  • 操作系统: Ubuntu 18.04
  • Python版本: python 3.8
  • Autosub版本: dev分支

额外信息(可选)
任何其他的能描述问题的信息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant