Resolving SSL Certificate Verification Error When Trying to Use Streaming STT

When using AssemblyAI’s Streaming STT feature, you may encounter the following error:

An error occurred: Could not connect to the real-time service: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

This error is typically caused by outdated or incomplete SSL certificates on your system, particularly Python certificates.

How to Resolve the Issue

  1. Update your system’s SSL certificates, focusing on Python certificates.

  2. If you’re using Python, you may need to install or update the certifi package, which provides Mozilla’s root certificate bundle.

  3. On some systems, you might need to run a command to install certificates for Python. The exact command can vary depending on your operating system and Python installation.

For macOS Users

If you’re using macOS, you can try running the following command in your terminal:

/Applications/Python 3.x/Install Certificates.command

Replace “3.x” with your Python version number.

For Windows Users

On Windows, you might need to download and install the certificates manually. You can find instructions for this process online, specific to your version of Windows and Python.

Additional Resources

For more detailed information on resolving SSL certificate issues in Python, you can refer to this Stack Overflow article.

If you continue to experience issues after updating your certificates, please contact AssemblyAI support for further assistance.