BingLingGroup / autosub

Command-line utility to transcribe/translate from video/audio/subtitles to subtitles
GNU General Public License v2.0
1.98k stars 244 forks source link

未知错误代码,无法解决 #130

Closed hironakamora closed 4 years ago

hironakamora commented 4 years ago

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

出现错误,不能翻译

输入命令等候,然后出现错误

D:\autosub\autosub>autosub -i "D:\扑克\High Mid Low_3.mp4" -S en-us -D zh-cn -bm all -F txt -of src dst -hp http://127.0.0.1:9696 -surl translate.google.cn
将源文件转换为"C:\Users\a-irr\AppData\Local\Temp\tmplblgu7w8.wav"来检测语音区域。
C:\Python27\ffmpeg.exe -hide_banner -y -i "D:\扑克\High Mid Low_3.mp4" -vn -ac 1 -ar 48000 -loglevel error "C:\Users\a-irr\AppData\Local\Temp\tmplblgu7w8.wav"

使用ffprobe来检查转换结果。
ffprobe.exe "C:\Users\a-irr\AppData\Local\Temp\tmplblgu7w8.wav" -show_format -pretty -loglevel quiet
[FORMAT]
filename=C:\Users\a-irr\AppData\Local\Temp\tmplblgu7w8.wav
nb_streams=1
nb_programs=0
format_name=wav
format_long_name=WAV / WAVE (Waveform Audio)
start_time=N/A
duration=0:04:08.000000
size=22.705153 Mibyte
bit_rate=768.002000 Kbit/s
probe_score=99
TAG:encoder=Lavf58.47.100
[/FORMAT]

转换完毕。
使用Auditok检测语音区域。
Auditok语音区域检测完毕。
"C:\Users\a-irr\AppData\Local\Temp\tmplblgu7w8.wav"已被删除。

按照语音区域将音频转换为多个短语音片段。
转换中: N/A% |                                                                                            | ETA:  --:--转换中: N/A% |                                                                                            | ETA:  --:--转换中:   5% |#####                                                                                        | ETA:  0:00转换中:  11% |##########                                                                                   | ETA:  0:00转换中:  16% |###############                                                                              | ETA:  0:00转换中:  22% |####################                                                                         | ETA:  0:00转换中:  27% |#########################                                                                    | ETA:  0:00转换中:  33% |###############################                                                              | ETA:  0:00转换中:  38% |####################################                                                         | ETA:  0:00转换中:  44% |#########################################                                                    | ETA:  0:00转换中:  50% |##############################################                                               | ETA:  0:00转换中:  55% |###################################################                                          | ETA:  0:00转换中:  61% |########################################################                                     | ETA:  0:00转换中:  64% |############################################################                                 | ETA:  0:00转换中:  70% |#################################################################                            | ETA:  0:00转换中:  75% |######################################################################                       | ETA:  0:00转换中:  81% |###########################################################################                  | ETA:  0:00转换中:  87% |################################################################################             | ETA:  0:00转换中:  92% |######################################################################################       | ETA:  0:00转换中:  98% |###########################################################################################  | ETA:  0:00转换中: 100% |#############################################################################################| Time: 0:00:01

将短片段语音发送给Google Speech V2 API并得到识别结果。
语音转文字中: 100% |##########################################################################################| Time: 0:19:55
语音字幕文件创建在了"D:\扑克\High Mid Low_3.en-us.txt"。
Traceback (most recent call last):
  File "D:\autosub\autosub\__main__.py", line 25, in <module>
  File "D:\autosub\autosub\autosub\__init__.py", line 156, in main
  File "D:\autosub\autosub\autosub\cmdline_utils.py", line 1361, in audio_or_video_prcs
TypeError: 'NoneType' object is not iterable

我要翻译上述mp4,转化成中英文字幕

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

sc30zhw commented 1 year ago

你好,我也遇到了这个问题,请问您解决了吗?