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

百度api调用3314错误 #114

Closed Yecgaa1 closed 4 years ago

Yecgaa1 commented 4 years ago

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

描述问题 清晰并准确地描述问题。 百度api调用3314错误 复现问题 复现问题的步骤:

  1. 你使用的命令行参数。
    autosub -sapi baidu -sconf "E:\autosub_pyinstaller\bdconf.txt" -ap y -i "E:\游戏剪辑\异星工厂素材\2020-04-02 12-23-37.mp4" -apc "ffmpeg.exe -hide_banner -i \"{in_}\" -map 0:1 -vn -af \"asplit[a],aphasemeter=video=0,ametadata=select:key=lavfi.aphasemeter.phase:value=-0.005:function=less,pan=1c^|c0=c0,aresample=async=1:first_pts=0,[a]amix\" -ac 1 -f flac -loglevel error \"{out_}\"" "ffmpeg.exe -hide_banner -i \"{in_}\" -af \"lowpass=3000,highpass=200\" -loglevel error \"{out_}\"" "ffmpeg-normalize.exe -v \"{in_}\" -ar 44100 -ofmt flac -c:a flac -pr -p -o \"{out_}\"" -mnrs 2
  2. 一份完整的autosub命令行输出。你可以使用Ctrl-ACtrl-C去复制所有输出。推荐使用以下的代码块markdown语法,将代码块复制到```和```之间即可。
ffmpeg.exe -hide_banner -i "E:\游戏剪辑\异星工厂素材\2020-04-02 12-23-37.mp4" -map 0:1 -vn -af "asplit[a],aphasemeter=video=0,ametadata=select:key=lavfi.aphasemeter.phase:value=-0.005:function=less,pan=1c|c0=c0,aresample=async=1:first_pts=0,[a]amix" -ac 1 -f flac -loglevel error "C:\TEMP\tmpsklmo8_6.flac"

使用ffprobe来检查转换结果。
E:\autosub_pyinstaller\ffprobe.exe "C:\TEMP\tmpsklmo8_6.flac" -show_format -pretty -loglevel quiet
[FORMAT]
filename=C:\TEMP\tmpsklmo8_6.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0:00:00.000000
duration=0:18:40.298667
size=20.556364 Mibyte
bit_rate=153.922000 Kbit/s
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf58.29.100
[/FORMAT]

ffmpeg.exe -hide_banner -i "C:\TEMP\tmpsklmo8_6.flac" -af "lowpass=3000,highpass=200" -loglevel error "C:\TEMP\tmpdvbgwxmm.flac"

使用ffprobe来检查转换结果。
E:\autosub_pyinstaller\ffprobe.exe "C:\TEMP\tmpdvbgwxmm.flac" -show_format -pretty -loglevel quiet
[FORMAT]
filename=C:\TEMP\tmpdvbgwxmm.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0:00:00.000000
duration=0:18:40.298667
size=14.294322 Mibyte
bit_rate=107.033000 Kbit/s
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf58.29.100
[/FORMAT]

ffmpeg-normalize.exe -v "C:\TEMP\tmpdvbgwxmm.flac" -ar 44100 -ofmt flac -c:a flac -pr -p -o "C:\TEMP\tmpdvm0f9ym.flac"
File:   0%|                                                                                      | 0/1 [00:00<?, ?it/s]

File:   0%|                                                                                      | 0/1 [00:02<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:01<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:06<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:07<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:07<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:08<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:09<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:10<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:10<?, ?it/s]
Stream 1/1:   0%|                                                                              | 0/100 [00:10<?, ?it/s]
Stream 1/1:   1%|▋                                                                     | 1/100 [00:11<01:12,  1.36it/s]
Stream 1/1:   2%|█▍                                                                    | 2/100 [00:15<02:44,  1.67s/it]
Stream 1/1:   3%|██                                                                    | 3/100 [00:17<02:55,  1.81s/it]
Stream 1/1:   4%|██▊                                                                   | 4/100 [00:20<03:35,  2.25s/it]
Stream 1/1:   5%|███▌                                                                  | 5/100 [00:23<03:50,  2.42s/it]
Stream 1/1:   6%|████▏                                                                 | 6/100 [00:26<04:05,  2.61s/it]
Stream 1/1:   7%|████▉                                                                 | 7/100 [00:29<04:30,  2.91s/it]
Stream 1/1:   8%|█████▌                                                                | 8/100 [00:33<04:37,  3.02s/it]
Stream 1/1:   9%|██████▎                                                               | 9/100 [00:36<04:35,  3.03s/it]
Stream 1/1:  10%|██████▉                                                              | 10/100 [00:38<04:11,  2.79s/it]
Stream 1/1:  11%|███████▌                                                             | 11/100 [00:41<04:07,  2.78s/it]
Stream 1/1:  12%|████████▎                                                            | 12/100 [00:42<03:33,  2.42s/it]
Stream 1/1:  13%|████████▉                                                            | 13/100 [00:44<03:09,  2.17s/it]
Stream 1/1:  14%|█████████▋                                                           | 14/100 [00:47<03:33,  2.48s/it]
Stream 1/1:  15%|██████████▎                                                          | 15/100 [00:50<03:38,  2.58s/it]
Stream 1/1:  16%|███████████                                                          | 16/100 [00:52<03:23,  2.42s/it]
Stream 1/1:  17%|███████████▋                                                         | 17/100 [00:54<03:00,  2.18s/it]
Stream 1/1:  18%|████████████▍                                                        | 18/100 [00:56<02:59,  2.19s/it]
Stream 1/1:  19%|█████████████                                                        | 19/100 [00:57<02:40,  1.98s/it]
Stream 1/1:  20%|█████████████▊                                                       | 20/100 [00:59<02:40,  2.01s/it]
Stream 1/1:  21%|██████████████▍                                                      | 21/100 [01:02<02:52,  2.19s/it]
Stream 1/1:  22%|███████████████▏                                                     | 22/100 [01:02<02:11,  1.68s/it]
Stream 1/1:  23%|███████████████▊                                                     | 23/100 [01:03<01:42,  1.33s/it]
Stream 1/1:  24%|████████████████▌                                                    | 24/100 [01:04<01:33,  1.23s/it]
Stream 1/1:  25%|█████████████████▎                                                   | 25/100 [01:04<01:16,  1.01s/it]
Stream 1/1:  26%|█████████████████▉                                                   | 26/100 [01:05<01:03,  1.16it/s]
Stream 1/1:  27%|██████████████████▋                                                  | 27/100 [01:06<00:55,  1.31it/s]
Stream 1/1:  28%|███████████████████▎                                                 | 28/100 [01:06<00:50,  1.42it/s]
Stream 1/1:  29%|████████████████████                                                 | 29/100 [01:09<01:29,  1.26s/it]
Stream 1/1:  30%|████████████████████▋                                                | 30/100 [01:11<01:49,  1.57s/it]
Stream 1/1:  31%|█████████████████████▍                                               | 31/100 [01:12<01:46,  1.55s/it]
Stream 1/1:  32%|██████████████████████                                               | 32/100 [01:13<01:34,  1.39s/it]
Stream 1/1:  33%|██████████████████████▊                                              | 33/100 [01:14<01:15,  1.12s/it]
Stream 1/1:  34%|███████████████████████▍                                             | 34/100 [01:14<01:01,  1.07it/s]
Stream 1/1:  35%|████████████████████████▏                                            | 35/100 [01:16<01:02,  1.04it/s]
Stream 1/1:  36%|████████████████████████▊                                            | 36/100 [01:17<01:02,  1.02it/s]
Stream 1/1:  37%|█████████████████████████▌                                           | 37/100 [01:18<01:02,  1.01it/s]
Stream 1/1:  38%|██████████████████████████▏                                          | 38/100 [01:18<00:52,  1.19it/s]
Stream 1/1:  39%|██████████████████████████▉                                          | 39/100 [01:19<00:54,  1.12it/s]
Stream 1/1:  40%|███████████████████████████▌                                         | 40/100 [01:20<00:56,  1.06it/s]
Stream 1/1:  41%|████████████████████████████▎                                        | 41/100 [01:21<00:57,  1.02it/s]
Stream 1/1:  42%|████████████████████████████▉                                        | 42/100 [01:23<01:07,  1.16s/it]
Stream 1/1:  43%|█████████████████████████████▋                                       | 43/100 [01:24<01:12,  1.27s/it]
Stream 1/1:  44%|██████████████████████████████▎                                      | 44/100 [01:26<01:23,  1.50s/it]
Stream 1/1:  45%|███████████████████████████████                                      | 45/100 [01:29<01:33,  1.70s/it]
Stream 1/1:  46%|███████████████████████████████▋                                     | 46/100 [01:31<01:37,  1.80s/it]
Stream 1/1:  47%|████████████████████████████████▍                                    | 47/100 [01:33<01:39,  1.87s/it]
Stream 1/1:  48%|█████████████████████████████████                                    | 48/100 [01:34<01:34,  1.81s/it]
Stream 1/1:  49%|█████████████████████████████████▊                                   | 49/100 [01:36<01:37,  1.91s/it]
Stream 1/1:  50%|██████████████████████████████████▌                                  | 50/100 [01:38<01:30,  1.81s/it]
Stream 1/1:  51%|███████████████████████████████████▏                                 | 51/100 [01:39<01:17,  1.58s/it]
Stream 1/1:  52%|███████████████████████████████████▉                                 | 52/100 [01:41<01:24,  1.75s/it]
Stream 1/1:  53%|████████████████████████████████████▌                                | 53/100 [01:43<01:20,  1.70s/it]
Stream 1/1:  55%|█████████████████████████████████████▉                               | 55/100 [01:45<01:07,  1.50s/it]
Stream 1/1:  56%|██████████████████████████████████████▋                              | 56/100 [01:45<00:52,  1.20s/it]
Stream 1/1:  57%|███████████████████████████████████████▎                             | 57/100 [01:46<00:42,  1.01it/s]
Stream 1/1:  58%|████████████████████████████████████████                             | 58/100 [01:47<00:41,  1.00it/s]
Stream 1/1:  59%|████████████████████████████████████████▋                            | 59/100 [01:48<00:41,  1.00s/it]
Stream 1/1:  60%|█████████████████████████████████████████▍                           | 60/100 [01:49<00:40,  1.00s/it]
Stream 1/1:  61%|██████████████████████████████████████████                           | 61/100 [01:50<00:39,  1.00s/it]
Stream 1/1:  62%|██████████████████████████████████████████▊                          | 62/100 [01:51<00:38,  1.01s/it]
Stream 1/1:  63%|███████████████████████████████████████████▍                         | 63/100 [01:52<00:38,  1.03s/it]
Stream 1/1:  64%|████████████████████████████████████████████▏                        | 64/100 [01:53<00:36,  1.03s/it]
Stream 1/1:  65%|████████████████████████████████████████████▊                        | 65/100 [01:54<00:41,  1.17s/it]
Stream 1/1:  66%|█████████████████████████████████████████████▌                       | 66/100 [01:55<00:38,  1.13s/it]
Stream 1/1:  67%|██████████████████████████████████████████████▏                      | 67/100 [01:56<00:36,  1.10s/it]
Stream 1/1:  68%|██████████████████████████████████████████████▉                      | 68/100 [01:57<00:34,  1.07s/it]
Stream 1/1:  69%|███████████████████████████████████████████████▌                     | 69/100 [01:59<00:32,  1.05s/it]
Stream 1/1:  70%|████████████████████████████████████████████████▎                    | 70/100 [02:00<00:36,  1.20s/it]
Stream 1/1:  71%|████████████████████████████████████████████████▉                    | 71/100 [02:01<00:33,  1.15s/it]
Stream 1/1:  72%|█████████████████████████████████████████████████▋                   | 72/100 [02:02<00:31,  1.11s/it]
Stream 1/1:  73%|██████████████████████████████████████████████████▎                  | 73/100 [02:03<00:29,  1.09s/it]
Stream 1/1:  74%|███████████████████████████████████████████████████                  | 74/100 [02:05<00:32,  1.25s/it]
Stream 1/1:  75%|███████████████████████████████████████████████████ ▊                 | 75/100 [02:06<00:29,  1.18s/it]
Stream 1/1:  76%|███████████████████████████████████████████████████ █▍                | 76/100 [02:07<00:30,  1.29s/it]
Stream 1/1:  77%|███████████████████████████████████████████████████ ██▏               | 77/100 [02:09<00:31,  1.38s/it]
Stream 1/1:  78%|███████████████████████████████████████████████████ ██▊               | 78/100 [02:10<00:31,  1.42s/it]
Stream 1/1:  79%|███████████████████████████████████████████████████ ███▌              | 79/100 [02:11<00:27,  1.30s/it]
Stream 1/1:  80%|███████████████████████████████████████████████████ ████▏             | 80/100 [02:12<00:24,  1.21s/it]
Stream 1/1:  81%|███████████████████████████████████████████████████ ████▉             | 81/100 [02:13<00:22,  1.16s/it]
Stream 1/1:  82%|███████████████████████████████████████████████████ █████▌            | 82/100 [02:14<00:20,  1.12s/it]
Stream 1/1:  83%|███████████████████████████████████████████████████ ██████▎           | 83/100 [02:16<00:21,  1.25s/it]
Stream 1/1:  84%|███████████████████████████████████████████████████ ██████▉           | 84/100 [02:17<00:19,  1.21s/it]
Stream 1/1:  85%|███████████████████████████████████████████████████ ███████▋          | 85/100 [02:19<00:18,  1.26s/it]
Stream 1/1:  86%|███████████████████████████████████████████████████ ████████▎         | 86/100 [02:19<00:14,  1.04s/it]
Stream 1/1:  87%|███████████████████████████████████████████████████ █████████         | 87/100 [02:21<00:15,  1.18s/it]
Stream 1/1:  88%|███████████████████████████████████████████████████ █████████▋        | 88/100 [02:21<00:11,  1.01it/s]
Stream 1/1:  89%|███████████████████████████████████████████████████ ██████████▍       | 89/100 [02:22<00:11,  1.00s/it]
Stream 1/1:  90%|███████████████████████████████████████████████████ ███████████       | 90/100 [02:23<00:10,  1.01s/it]
Stream 1/1:  91%|███████████████████████████████████████████████████ ███████████▊      | 91/100 [02:24<00:09,  1.02s/it]
Stream 1/1:  92%|███████████████████████████████████████████████████ ████████████▍     | 92/100 [02:25<00:08,  1.01s/it]
Stream 1/1:  93%|███████████████████████████████████████████████████ █████████████▏    | 93/100 [02:26<00:07,  1.02s/it]
Stream 1/1:  94%|███████████████████████████████████████████████████ █████████████▊    | 94/100 [02:27<00:06,  1.01s/it]
Stream 1/1:  95%|███████████████████████████████████████████████████ ██████████████▌   | 95/100 [02:28<00:05,  1.01s/it]
Stream 1/1:  96%|███████████████████████████████████████████████████ ███████████████▏  | 96/100 [02:29<00:04,  1.05s/it]
Stream 1/1:  97%|███████████████████████████████████████████████████ ███████████████▉  | 97/100 [02:30<00:03,  1.04s/it]
Stream 1/1:  98%|███████████████████████████████████████████████████ ████████████████▌ | 98/100 [02:31<00:02,  1.03s/it]
Stream 1/1:  99%|███████████████████████████████████████████████████ █████████████████▎| 99/100 [02:32<00:01,  1.04s/it]
Stream 1/1: 100%|███████████████████████████████████████████████████ Stream 1/1: 100%|███████████████████████████████████████████████████ █████████████████| 100/100 [02:33<00:00,  1.54s/it]

File:   0%|                                                                                      | 0/1 [02:35<?, ?it/s]
Second Pass:   0%|                                                                             | 0/100 [00:00<?, ?it/s]
Second Pass:   0%|                                                                             | 0/100 [00:01<?, ?it/s]
Second Pass:   0%|                                                                             | 0/100 [00:01<?, ?it/s]
Second Pass:   0%|                                                                             | 0/100 [00:02<?, ?it/s]
Second Pass:   0%|                                                                             | 0/100 [00:02<?, ?it/s]
Second Pass:   1%|▋                                                                    | 1/100 [00:03<00:55,  1.77it/s]
Second Pass:   2%|█▍                                                                   | 2/100 [00:05<01:39,  1.01s/it]
Second Pass:   3%|██                                                                   | 3/100 [00:07<01:53,  1.17s/it]
Second Pass:   4%|██▊                                                                  | 4/100 [00:08<01:48,  1.13s/it]
Second Pass:   5%|███▍                                                                 | 5/100 [00:09<01:43,  1.09s/it]
Second Pass:   6%|████▏                                                                | 6/100 [00:10<01:55,  1.23s/it]
Second Pass:   7%|████▊                                                                | 7/100 [00:12<02:03,  1.32s/it]
Second Pass:   8%|█████▌                                                               | 8/100 [00:13<02:09,  1.40s/it]
Second Pass:   9%|██████▏                                                              | 9/100 [00:15<02:11,  1.45s/it]
Second Pass:  10%|██████▊                                                             | 10/100 [00:16<02:12,  1.47s/it]
Second Pass:  11%|███████▍                                                            | 11/100 [00:18<02:11,  1.48s/it]
Second Pass:  12%|████████▏                                                           | 12/100 [00:19<01:58,  1.34s/it]
Second Pass:  13%|████████▊                                                           | 13/100 [00:20<02:01,  1.40s/it]
Second Pass:  14%|█████████▌                                                          | 14/100 [00:22<02:03,  1.44s/it]
Second Pass:  15%|██████████▏                                                         | 15/100 [00:23<01:51,  1.31s/it]
Second Pass:  16%|██████████▉                                                         | 16/100 [00:24<01:55,  1.38s/it]
Second Pass:  17%|███████████▌                                                        | 17/100 [00:26<01:46,  1.29s/it]
Second Pass:  18%|████████████▏                                                       | 18/100 [00:27<01:40,  1.23s/it]
Second Pass:  19%|████████████▉                                                       | 19/100 [00:28<01:46,  1.32s/it]
Second Pass:  20%|█████████████▌                                                      | 20/100 [00:29<01:38,  1.23s/it]
Second Pass:  21%|██████████████▎                                                     | 21/100 [00:30<01:31,  1.16s/it]
Second Pass:  22%|██████████████▉                                                     | 22/100 [00:31<01:29,  1.14s/it]
Second Pass:  23%|███████████████▋                                                    | 23/100 [00:33<01:34,  1.23s/it]
Second Pass:  24%|████████████████▎                                                   | 24/100 [00:34<01:28,  1.17s/it]
Second Pass:  25%|█████████████████                                                   | 25/100 [00:35<01:23,  1.12s/it]
Second Pass:  26%|█████████████████▋                                                  | 26/100 [00:36<01:32,  1.25s/it]
Second Pass:  27%|██████████████████▎                                                 | 27/100 [00:37<01:26,  1.18s/it]
Second Pass:  28%|███████████████████                                                 | 28/100 [00:39<01:32,  1.29s/it]
Second Pass:  29%|███████████████████▋                                                | 29/100 [00:40<01:25,  1.20s/it]
Second Pass:  30%|████████████████████▍                                               | 30/100 [00:41<01:20,  1.15s/it]
Second Pass:  31%|█████████████████████                                               | 31/100 [00:42<01:17,  1.12s/it]
Second Pass:  32%|█████████████████████▊                                              | 32/100 [00:43<01:12,  1.07s/it]
Second Pass:  33%|██████████████████████▍                                             | 33/100 [00:44<01:21,  1.22s/it]
Second Pass:  34%|███████████████████████                                             | 34/100 [00:45<01:06,  1.01s/it]
Second Pass:  35%|███████████████████████▊                                            | 35/100 [00:46<01:05,  1.01s/it]
Second Pass:  36%|████████████████████████▍                                           | 36/100 [00:47<01:04,  1.01s/it]
Second Pass:  37%|█████████████████████████▏                                          | 37/100 [00:48<01:03,  1.01s/it]
Second Pass:  38%|█████████████████████████▊                                          | 38/100 [00:49<01:02,  1.01s/it]
Second Pass:  39%|██████████████████████████▌                                         | 39/100 [00:50<01:01,  1.02s/it]
Second Pass:  40%|███████████████████████████▏                                        | 40/100 [00:52<01:09,  1.17s/it]
Second Pass:  41%|███████████████████████████▉                                        | 41/100 [00:53<01:06,  1.13s/it]
Second Pass:  42%|████████████████████████████▌                                       | 42/100 [00:54<01:03,  1.09s/it]
Second Pass:  43%|█████████████████████████████▏                                      | 43/100 [00:55<01:01,  1.07s/it]
Second Pass:  44%|█████████████████████████████▉                                      | 44/100 [00:56<00:58,  1.05s/it]
Second Pass:  45%|██████████████████████████████▌                                     | 45/100 [00:57<00:57,  1.04s/it]
Second Pass:  46%|███████████████████████████████▎                                    | 46/100 [00:58<01:03,  1.18s/it]
Second Pass:  47%|███████████████████████████████▉                                    | 47/100 [00:59<01:02,  1.17s/it]
Second Pass:  48%|████████████████████████████████▋                                   | 48/100 [01:00<00:59,  1.15s/it]
Second Pass:  49%|█████████████████████████████████▎                                  | 49/100 [01:01<00:55,  1.09s/it]
Second Pass:  50%|██████████████████████████████████                                  | 50/100 [01:03<01:00,  1.22s/it]
Second Pass:  51%|██████████████████████████████████▋                                 | 51/100 [01:04<00:57,  1.17s/it]
Second Pass:  52%|███████████████████████████████████▎                                | 52/100 [01:06<01:03,  1.33s/it]
Second Pass:  53%|████████████████████████████████████                                | 53/100 [01:07<01:05,  1.39s/it]
Second Pass:  54%|████████████████████████████████████▋                               | 54/100 [01:08<00:58,  1.27s/it]
Second Pass:  55%|█████████████████████████████████████▍                              | 55/100 [01:09<00:53,  1.19s/it]
Second Pass:  56%|██████████████████████████████████████                              | 56/100 [01:10<00:50,  1.15s/it]
Second Pass:  57%|██████████████████████████████████████▊                             | 57/100 [01:12<00:54,  1.26s/it]
Second Pass:  58%|███████████████████████████████████████▍                            | 58/100 [01:13<00:49,  1.19s/it]
Second Pass:  59%|████████████████████████████████████████                            | 59/100 [01:14<00:47,  1.15s/it]
Second Pass:  60%|████████████████████████████████████████▊                           | 60/100 [01:15<00:44,  1.12s/it]
Second Pass:  61%|█████████████████████████████████████████▍                          | 61/100 [01:15<00:36,  1.07it/s]
Second Pass:  62%|██████████████████████████████████████████▏                         | 62/100 [01:16<00:36,  1.04it/s]
Second Pass:  63%|██████████████████████████████████████████▊                         | 63/100 [01:17<00:30,  1.22it/s]
Second Pass:  64%|███████████████████████████████████████████▌                        | 64/100 [01:18<00:31,  1.13it/s]
Second Pass:  65%|████████████████████████████████████████████▏                       | 65/100 [01:19<00:32,  1.07it/s]
Second Pass:  66%|████████████████████████████████████████████▉                       | 66/100 [01:21<00:37,  1.12s/it]
Second Pass:  67%|█████████████████████████████████████████████▌                      | 67/100 [01:22<00:35,  1.09s/it]
Second Pass:  68%|██████████████████████████████████████████████▏                     | 68/100 [01:23<00:34,  1.07s/it]
Second Pass:  69%|██████████████████████████████████████████████▉                     | 69/100 [01:24<00:33,  1.08s/it]
Second Pass:  70%|███████████████████████████████████████████████▌                    | 70/100 [01:25<00:36,  1.21s/it]
Second Pass:  71%|████████████████████████████████████████████████▎                   | 71/100 [01:26<00:33,  1.15s/it]
Second Pass:  72%|████████████████████████████████████████████████▉                   | 72/100 [01:27<00:31,  1.11s/it]
Second Pass:  73%|█████████████████████████████████████████████████▋                  | 73/100 [01:29<00:33,  1.24s/it]
Second Pass:  74%|██████████████████████████████████████████████████▎                 | 74/100 [01:30<00:31,  1.19s/it]
Second Pass:  75%|███████████████████████████████████████████████████                 | 75/100 [01:31<00:32,  1.28s/it]
Second Pass:  76%|███████████████████████████████████████████████████▋                | 76/100 [01:32<00:29,  1.21s/it]
Second Pass:  77%|████████████████████████████████████████████████████▎               | 77/100 [01:34<00:30,  1.31s/it]
Second Pass:  78%|█████████████████████████████████████████████████████               | 78/100 [01:35<00:26,  1.22s/it]
Second Pass:  79%|█████████████████████████████████████████████████████▋              | 79/100 [01:36<00:27,  1.31s/it]
Second Pass:  80%|██████████████████████████████████████████████████████▍             | 80/100 [01:37<00:24,  1.22s/it]
Second Pass:  81%|███████████████████████████████████████████████████████             | 81/100 [01:39<00:24,  1.31s/it]
Second Pass:  82%|███████████████████████████████████████████████████████▊            | 82/100 [01:41<00:25,  1.39s/it]
Second Pass:  83%|████████████████████████████████████████████████████████▍           | 83/100 [01:42<00:21,  1.28s/it]
Second Pass:  84%|█████████████████████████████████████████████████████████           | 84/100 [01:43<00:19,  1.20s/it]
Second Pass:  85%|█████████████████████████████████████████████████████████▊          | 85/100 [01:45<00:21,  1.44s/it]
Second Pass:  86%|██████████████████████████████████████████████████████████▍         | 86/100 [01:46<00:18,  1.33s/it]
Second Pass:  87%|███████████████████████████████████████████████████████████▏        | 87/100 [01:47<00:16,  1.26s/it]
Second Pass:  88%|███████████████████████████████████████████████████████████▊        | 88/100 [01:48<00:16,  1.34s/it]
Second Pass:  89%|████████████████████████████████████████████████████████████▌       | 89/100 [01:49<00:13,  1.25s/it]
Second Pass:  90%|█████████████████████████████████████████████████████████████▏      | 90/100 [01:51<00:13,  1.34s/it]
Second Pass:  91%|█████████████████████████████████████████████████████████████▉      | 91/100 [01:52<00:11,  1.25s/it]
Second Pass:  92%|██████████████████████████████████████████████████████████████▌     | 92/100 [01:54<00:10,  1.36s/it]
Second Pass:  93%|███████████████████████████████████████████████████████████████▏    | 93/100 [01:55<00:09,  1.41s/it]
Second Pass:  94%|███████████████████████████████████████████████████████████████▉    | 94/100 [01:57<00:08,  1.47s/it]
Second Pass:  95%|████████████████████████████████████████████████████████████████▌   | 95/100 [01:58<00:06,  1.33s/it]
Second Pass:  96%|█████████████████████████████████████████████████████████████████▎  | 96/100 [01:59<00:04,  1.25s/it]
Second Pass:  97%|█████████████████████████████████████████████████████████████████▉  | 97/100 [02:00<00:03,  1.20s/it]
Second Pass:  98%|██████████████████████████████████████████████████████████████████▋ | 98/100 [02:01<00:02,  1.30s/it]
Second Pass:  99%|███████████████████████████████████████████████████Second Pass: 100%|███████████████████████████████████████████████████████████████████| 100/100 [02:02<00:00,  1.23s/it]
File: 100%|██████████████████████████████████████████████████████ File: 100%|██████████████████████████████████████████████████████ ███████████████████████| 1/1 [04:38<00:00, 278.48s/it]

使用ffprobe来检查转换结果。
E:\autosub_pyinstaller\ffprobe.exe "C:\TEMP\tmpdvm0f9ym.flac" -show_format -pretty -loglevel quiet
[FORMAT]
filename=C:\TEMP\tmpdvm0f9ym.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0:00:00.000000
duration=0:18:40.298662
size=18.947818 Mibyte
bit_rate=141.878000 Kbit/s
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:encoder=Lavf58.29.100
[/FORMAT]

音频预处理已完成。
翻译目的语言未提供。只进行语音识别。
语音语言和目的语言一致。只进行语音识别。

将源文件转换为"C:\TEMP\tmpx3siy5lm.wav"来检测语音区域。
E:\autosub_pyinstaller\ffmpeg.exe -hide_banner -y -i "C:\TEMP\tmpdvm0f9ym.flac" -vn -ac 1 -ar 48000 -loglevel error "C:\TEMP\tmpx3siy5lm.wav"

使用ffprobe来检查转换结果。
E:\autosub_pyinstaller\ffprobe.exe "C:\TEMP\tmpx3siy5lm.wav" -show_format -pretty -loglevel quiet
[FORMAT]
filename=C:\TEMP\tmpx3siy5lm.wav
nb_streams=1
nb_programs=0
format_name=wav
format_long_name=WAV / WAVE (Waveform Audio)
start_time=N/A
duration=0:18:40.298667
size=102.566481 Mibyte
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.
"C:\TEMP\tmpx3siy5lm.wav" has been deleted.

按照语音区域将音频转换为多个短语音片段。
转换中: N/A% |                                                                                            | ETA:  --:--转换中: N/A% |                                                                                            | ETA:  --:--转换中:   3% |##                                                                                          | ETA:   0:01转换中:   6% |#####                                                                                       | ETA:   0:01转换中:   9% |########                                                                                    | ETA:   0:00转换中:  12% |###########                                                                                 | ETA:   0:00转换中:  16% |##############                                                                              | ETA:   0:00转换中:  19% |#################                                                                           | ETA:   0:00转换中:  22% |####################                                                                        | ETA:   0:00转换中:  25% |#######################                                                                     | ETA:   0:00转换中:  29% |##########################                                                                  | ETA:   0:00转换中:  32% |#############################                                                               | ETA:   0:00转换中:  35% |################################                                                            | ETA:   0:00转换中:  38% |###################################                                                         | ETA:   0:00转换中:  41% |######################################                                                      | ETA:   0:00转换中:  45% |#########################################                                                   | ETA:   0:00转换中:  51% |###############################################                                             | ETA:   0:00转换中:  54% |##################################################                                          | ETA:   0:00转换中:  58% |#####################################################                                       | ETA:   0:00转换中:  61% |########################################################                                    | ETA:   0:00转换中:  64% |###########################################################                                 | ETA:   0:00转换中:  67% |##############################################################                              | ETA:   0:00转换中:  70% |#################################################################                           | ETA:   0:00转换中:  74% |####################################################################                        | ETA:   0:00转换中:  77% |#######################################################################                     | ETA:   0:00转换中:  80% |##########################################################################                  | ETA:   0:00转换中:  83% |#############################################################################               | ETA:   0:00转换中:  87% |################################################################################            | ETA:   0:00转换中:  90% |###################################################################################         | ETA:   0:00转换中:  93% |######################################################################################      | ETA:   0:00转换中:  96% |#########################################################################################   | ETA:   0:00转换中: 100% |############################################################################################| Time:  0:00:21

Sending short-term fragments to Baidu ASR API and getting result.
Get the token online.
语音转文字中: N/A% |                                                                                         | ETA:  --语音转文字中: 100% |#########################################################################################| Time:  0:00:03
收到未预期数据:
{
    "err_msg": "invalid audio length",
    "err_no": 3314,
    "sn": "93856806071586158104"
}
错误:语音转文字失败。
做完了。
  1. 等等

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

最终输出字幕文件

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

Yecgaa1 commented 4 years ago

BingLingGroup commented 4 years ago

这是指音频长度的len参数不能小于等于4,我等下写个检测来避开这个问题

BingLingGroup commented 4 years ago

提交 https://github.com/BingLingGroup/autosub/commit/d84ecabd59ec62b01ba595676285d85509ac7568 应该可以解决这个问题,最新的pyinstaller build在附件里 autosub.zip