Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Vosk-transcriber cli SSL certificate error #1200

Closed
dhombios opened this issue Nov 14, 2022 · 3 comments
Closed

Vosk-transcriber cli SSL certificate error #1200

dhombios opened this issue Nov 14, 2022 · 3 comments

Comments

@dhombios
Copy link

When running vosk-transcriber on Windows 10 using the Spanish language model, the following message is shown:

vosk-model-small-es-0.42.zip: 0.00B [00:00, ?B/s]
Traceback (most recent call last):
  File "c:\python39\lib\urllib\request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "c:\python39\lib\http\client.py", line 1253, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "c:\python39\lib\http\client.py", line 1299, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\python39\lib\http\client.py", line 1248, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\python39\lib\http\client.py", line 1008, in _send_output
    self.send(msg)
  File "c:\python39\lib\http\client.py", line 948, in send
    self.connect()
  File "c:\python39\lib\http\client.py", line 1422, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "c:\python39\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "c:\python39\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "c:\python39\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\vosk-transcriber.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\vosk\transcriber\cli.py", line 71, in main
    transcriber = Transcriber(args)
  File "c:\python39\lib\site-packages\vosk\transcriber\transcriber.py", line 21, in __init__
    self.model = Model(model_path=args.model, model_name=args.model_name, lang=args.lang)
  File "c:\python39\lib\site-packages\vosk\__init__.py", line 54, in __init__
    model_path = self.get_model_path(model_name, lang)
  File "c:\python39\lib\site-packages\vosk\__init__.py", line 67, in get_model_path
    model_path = self.get_model_by_lang(lang)
  File "c:\python39\lib\site-packages\vosk\__init__.py", line 105, in get_model_by_lang
    self.download_model(Path(directory, result_model[0]))
  File "c:\python39\lib\site-packages\vosk\__init__.py", line 115, in download_model
    urlretrieve(MODEL_PRE_URL + str(model_name.name) + ".zip",
  File "c:\python39\lib\urllib\request.py", line 239, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "c:\python39\lib\urllib\request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "c:\python39\lib\urllib\request.py", line 517, in open
    response = self._open(req, data)
  File "c:\python39\lib\urllib\request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "c:\python39\lib\urllib\request.py", line 494, in _call_chain
    result = func(*args)
  File "c:\python39\lib\urllib\request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "c:\python39\lib\urllib\request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>
Exception ignored in: <function Model.__del__ at 0x0000019135D6BF70>
Traceback (most recent call last):
  File "c:\python39\lib\site-packages\vosk\__init__.py", line 60, in __del__
    _c.vosk_model_free(self._handle)
AttributeError: 'Model' object has no attribute '_handle'

System information

Operating system: Windows 10
Python version: 3.9
Vosk version: 0.3.44 (according to pip)

@nshmyrev
Copy link
Collaborator

Same as #1015

You need to update root certificates somehow, not sure how to do it. Probably it is easier to download model manually and use it with -m option.

@nshmyrev
Copy link
Collaborator

Solution here #1137 (comment)

@dhombios
Copy link
Author

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

2 participants