I am getting an SSL Certficaite Verify Failed on the given python example in the docs
from elevenlabs.client import ElevenLabs
from elevenlabs import stream
client = ElevenLabs(
api_key="YOUR_API_KEY", # Defaults to ELEVEN_API_KEY
)
def text_stream():
yield "Hi there, I'm Eleven "
yield "I'm a text to speech API "
audio_stream = client.generate(
text=text_stream(),
voice="Nicole",
model="eleven_monolingual_v1",
stream=True
)
stream(audio_stream)
error
/usr/local/bin/python3 /Users/mohannedkandil/Desktop/TUM/Hiwi/AtentaRobot/test.py ─╯
Traceback (most recent call last):
File "/Users/mohannedkandil/Desktop/TUM/Hiwi/AtentaRobot/test.py", line 38, in <module>
stream(audio_stream)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/elevenlabs/play.py", line 82, in stream
for chunk in audio_stream:
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/elevenlabs/realtime_tts.py", line 87, in convert_realtime
with connect(
^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/websockets/sync/client.py", line 266, in connect
sock = ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1075, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)