Docker AutoSub 使用方法

  • fennng 

使用Autosub 需要一个谷歌翻译API的KEY, 可以到谷歌去创建一个, 链接在这里

https://console.developers.google.com

如果你还没有安装DOCKER, 你需要安装DOCKER, 请到这里

https://store.docker.com/editions/community/docker-ce-desktop-windows

Autosub 本身的安装和使用非常简单, 以下是命令, 运行的时候, 确定在和MP3文件相同的文件夹里运行。

docker run --rm -v %cd%:/root fennng/autosub autosub -S zh-CN -D zh-CN  -F srt -K 这里放API_KEY 音频文件.mp3  

Linux 下 %cd% 换成 $PWD

sudo docker run --rm -v $PWD:/root fennng/autosub autosub -S zh-CN -D zh-CN  -F srt -K 这里放API_KEY  音频文件.mp3   

视频教程在这里

《Docker AutoSub 使用方法》有3个想法

  1. 请教峰哥 docker run –rm -v %cd%:/root fennng/autosub autosub -S zh-CN -D zh-CN -F srt -K 这里放 API_KEY 音频文件.mp3 中的fennng/autosub是项目名称吗?怎么没有替换?

  2. 峰哥 这是我运行的情况 不知道哪里出错了啊~

    λ docker run –rm -v %cd%:/root fennng/autosub autosub -S en -D zh-CN -F srt -K AIzaSyDSdZdIl0ZblbNYs9Ja2Ic3ULOvcGn1JFA main.mp3
    Converting speech regions to FLAC files: 100% |#################| Time: 0:00:18
    Performing speech recognition: 100% |###########################| Time: 0:27:56
    Traceback (most recent call last):
    File “/usr/local/bin/autosub”, line 304, in
    sys.exit(main())
    File “/usr/local/bin/autosub”, line 261, in main
    src=args.src_language)
    File “/usr/local/bin/autosub”, line 95, in __init__
    developerKey=self.api_key)
    File “/usr/local/lib/python2.7/dist-packages/googleapiclient/_helpers.py”, line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py”, line 222, in build
    requested_url, discovery_http, cache_discovery, cache)
    File “/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py”, line 269, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
    File “/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py”, line 1694, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
    File “/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py”, line 1434, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
    File “/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py”, line 1390, in _conn_request
    response = conn.getresponse()
    File “/usr/lib/python2.7/httplib.py”, line 1108, in getresponse
    raise ResponseNotReady()
    httplib.ResponseNotReady

发表评论

电子邮件地址不会被公开。 必填项已用*标注