-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Description
Summary
"Segmentation Fault" happened when use azure tts sdk and faiss at the same time.
Platform
I'm not sure this problem can be reproducted on other platform
OS: Ubuntu 18.04
Faiss version: 1.7.2
Installed from: anaconda
Faiss compilation options: Not compiled from source
conda install -c pytorch faiss-cpu
Running on:
- CPU
- GPU
Interface:
- C++
- Python
Reproduction instructions
import azure.cognitiveservices.speech as speechsdk
import faiss
import faulthandler
faulthandler.enable()
speech_config = speechsdk.SpeechConfig(subscription="hidden", region="chinanorth2")
synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
result = synthesizer.speak_text_async('hello, world').get()
(test3) root@yinjiakang-devbox:/mnt3/demo/test# python test.py
Fatal Python error: Segmentation fault
Current thread 0x00007f4f8f21a0c0 (most recent call first):
File "/root/miniconda3/envs/test3/lib/python3.6/site-packages/faiss/swigfaiss_avx2.py", line 94 in __next__
File "/root/miniconda3/envs/test3/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 5428 in audio_data
File "/root/miniconda3/envs/test3/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech.py", line 1039 in __init__
File "/root/miniconda3/envs/test3/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech.py", line 504 in get
File "test.py", line 8 in <module>
Segmentation fault
And if I comment the import faiss
, the code is passed
import azure.cognitiveservices.speech as speechsdk
# import faiss
import faulthandler
faulthandler.enable()
speech_config = speechsdk.SpeechConfig(subscription="hidden", region="chinanorth2")
synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
result = synthesizer.speak_text_async('hello, world').get()
And if I comment the azure tts code, the code is passed too
# import azure.cognitiveservices.speech as speechsdk
import faiss
import faulthandler
faulthandler.enable()
# speech_config = speechsdk.SpeechConfig(subscription="hidden", region="chinanorth2")
# synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
# result = synthesizer.speak_text_async('hello, world').get()
print("everything is ok")