Closed tarunaroraonline closed 1 month ago
What about your raspberry pi and OS version?
This problem may be caused by the openssl version. Azure speech sdk uses version 1.1, and the default version of Ubuntu 22.02 system is 3.0, so you must install a 1.1 version of openssl. You can refer to this link: Failed to initialize platform (azure-c-shared). Error: 2153
Thanks for responding, i'll take a look to see if this fixes the issue. Much appreciated :)
Thanks for responding, i'll take a look to see if this fixes the issue. Much appreciated :)
You're welcome, this problem has been solved, please reply.
Yup all good, this has fixed the problem... Just listing out the steps for others...
wget https://www.openssl.org/source/openssl-1.1.1u.tar.gz
tar -xf openssl-1.1.1u.tar.gz cd openssl-1.1.1u
./config make sudo make install
sudo ldconfig
openssl version
openssl version -d
export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH
echo 'export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc
pip uninstall azure-cognitiveservices-speech pip install azure-cognitiveservices-speech
python gptspeaker.py
Yup all good, this has fixed the problem... Just listing out the steps for others...
download the OpenSSL 1.1 source:
wget https://www.openssl.org/source/openssl-1.1.1u.tar.gz
extract tarball tar -xf openssl-1.1.1u.tar.gz cd openssl-1.1.1u
Configure and install OpenSSL 1.1:
./config make sudo make install
Update the shared library cache:
sudo ldconfig
Verify the installation:
openssl version
Find the installation path:
openssl version -d
Set the LD_LIBRARY_PATH environment variable:
export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH
Make this change persistent across sessions:
echo 'export LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc
Reinstall the Azure SDK (Optional)
pip uninstall azure-cognitiveservices-speech pip install azure-cognitiveservices-speech
Test Your Script
python gptspeaker.py
👍
Followed the steps you've outlined... Have you run into this issue at all? Seems to fail saying failed to initialize platform... I've tested the mic and speaker separately and they seem to work on the pi.
me/taa/gptspeaker/gptspeaker/lib/python3.11/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x10c) [0x7f977f21a4] /lib/aarch64-linux-gnu/libffi.so.8(+0x63e0) [0x7f97ec63e0] /lib/aarch64-linux-gnu/libffi.so.8(+0x5b24) [0x7f97ec5b24] /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-aarch64-linux-gnu.so(+0x12094) [0x7f97f12094] [CALL STACK END]
Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176