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

Sending short-term fragments to Google Speech V2 API and getting result.出现错误 #115

Closed ChongzhengZhao closed 4 years ago

ChongzhengZhao commented 4 years ago

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

描述问题 清晰并准确地描述问题。

复现问题 -rwxrwxrwx 0 root wheel 293K 29 Mar 11:21 CCC-W2.vtt -rwxrwxrwx 0 root wheel 100M 29 Mar 11:21 CCC-W2T1.mp4 -rwxrwxrwx 0 root wheel 106K 29 Mar 11:21 CCC-W2T1.vtt -rwxrwxrwx 0 root wheel 131M 29 Mar 11:21 CCC-W2T2.mp4 -rwxrwxrwx 0 root wheel 131K 29 Mar 11:21 CCC-W2T2.vtt -rwxrwxrwx 0 root wheel 148M 29 Mar 11:21 CCC-W3.mp4 -rwxrwxrwx 0 root wheel 302K 29 Mar 11:21 CCC-W3.vtt -rwxrwxrwx 0 root wheel 108M 31 Mar 20:31 CCC-W3T1.mp4 -rwxrwxrwx 0 root wheel 85M 31 Mar 20:32 CCC-W3T2.mp4 -rwxrwxrwx 0 root wheel 4.2K 31 Mar 20:46 CCC-W3T2.txt -rwxrwxrwx 0 root wheel 222M 3 Apr 15:22 CCC-W4.mp4 -rwxrwxrwx 0 root wheel 6.2K 3 Apr 15:21 CCC-W4.txt -rwxrwxrwx 0 root wheel 89M 3 Apr 15:22 CCC-W4T1.mp4 -rwxrwxrwx 0 root wheel 4.5K 3 Apr 15:22 CCC-W4T1.txt -rwxrwxrwx 0 root wheel 83M 3 Apr 15:22 CCC-W4T2.mp4 -rwxrwxrwx 0 root wheel 862B 3 Apr 15:22 CCC-W4T2.txt -rwxrwxrwx 0 root wheel 176M 13 Apr 20:18 CCC-W5L.mp4 -rwxrwxrwx 0 root wheel 6.4K 13 Apr 19:10 CCC-W5L.txt -rwxrwxrwx 0 root wheel 569M 13 Apr 19:14 CCC-W5T1.mp4 -rwxrwxrwx 0 root wheel 141M 13 Apr 19:14 CCC-W5T2.mp4 -rwxrwxrwx 0 root wheel 1.0K 13 Apr 19:10 CCC-W5T2.txt -rwxrwxrwx 0 root wheel 67M 13 Apr 19:13 CCC-W5T3.mp4 /Volumes/iboysoft_ntfsdisk2s1/2020S2Recording Warehouse/CCC Recording  autosub -i CCC-W5L.mp4 -S en -D en Warning: Speech language "en" is not recommended. Run with "-lsc"/"--list-speech-codes" to see all supported languages. Or use "-bm"/"--best-match" to get a best match. Translation source language not provided. Use speech language instead. Speech language is the same as the destination language. Only performing speech recognition.

Convert source file to "/var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav" to detect audio regions. /usr/local/bin/ffmpeg -hide_banner -y -i "CCC-W5L.mp4" -vn -ac 1 -ar 48000 "/var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav" Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'CCC-W5L.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2020-04-01T06:30:21.000000Z Duration: 02:03:29.40, start: 0.000000, bitrate: 199 kb/s Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 53 kb/s (default) Metadata: creation_time : 2020-04-01T06:30:21.000000Z handler_name : AAC audio Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1680x1050, 143 kb/s, 25 fps, 25 tbr, 30k tbn, 60k tbc (default) Metadata: creation_time : 2020-04-01T06:30:21.000000Z handler_name : H.264/AVC video encoder : AVC Coding Stream mapping: Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, wav, to '/var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 ISFT : Lavf58.29.100 Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s (default) Metadata: creation_time : 2020-04-01T06:30:21.000000Z handler_name : AAC audio encoder : Lavc58.54.100 pcm_s16le size= 694611kB time=02:03:29.21 bitrate= 768.0kbits/s speed= 711x video:0kB audio:694611kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000011%

Use ffprobe to check conversion result. /usr/local/bin/ffprobe /var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav -show_format -pretty -loglevel quiet [FORMAT] filename=/var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav nb_streams=1 nb_programs=0 format_name=wav format_long_name=WAV / WAVE (Waveform Audio) start_time=N/A duration=2:03:29.184000 size=678.331129 Mibyte bit_rate=768 Kbit/s probe_score=99 TAG:encoder=Lavf58.29.100 [/FORMAT]

Conversion complete. Use Auditok to detect speech regions.

"/var/folders/_x/g9_wzj0d3096h84_h1rw4rnh0000gn/T/tmpbsvOzc.wav" has been deleted.

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

Sending short-term fragments to Google Speech V2 API and getting result. objc[94485]: +[NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[94482]: +[NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[94482]: +[NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. objc[94485]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. objc[94484]: +[NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[94484]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. objc[94483]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. ..............

  1. 等等

期待的行为 清晰并准确地描述你本想做的事情。

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

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

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

BingLingGroup commented 4 years ago

同一个问题 #93