Closed bjtommychen closed 5 years ago
Can you provide the information of your OS, python and swig?
ubuntu 16.04 Python 3.5.2 SWIG Version 3.0.12 Compiled with g++ [x86_64-pc-linux-gnu] Configured options: +pcre
thanks.
@xiongyihui follow your guide, python2 run OK. but python3 failed. would you give me some clue? thank.s
Tried to reproduce it, but it works with python3 on my Ubuntu 16.04
mkdir sandbox && cd sandbox
python3 -m venv venv
. venv/bin/activate
pip3 install wheel
pip3 install webrtc-audio-processing
wget https://github.com/xiongyihui/python-webrtc-audio-processing/raw/master/examples/wav_ns.py
arecord -f S16_LE -c 1 -r 16000 -v mono16k.wav
python3 wav_ns.py mono16k.wav out.wav
aplay -v out.wav
Can you try these commands?
@xiongyihui, thanks for your quick answer. I follow your commands. got same error as below. I doubt it may caused by the python3 version. Please help to figure it out. Thanks. Which python3 version you use ?
python3 --version Python 3.5.2
~/d/sandbox$ python3 wav_ns.py ~/d/mono16k.wav out.wav
Traceback (most recent call last):
File "wav_ns.py", line 37, in
My python version is also 3.5.2
Maybe it is a problem of swig. I compiled and installed swig from source code. How do you install swig?
You can test the pre-compiled wheel package.
@xiongyihui I installed swig using apt. Thank you very much. the wheel work ! I can continue my test, thanks again.
@xiongyihui Is there a python3.7.3 wheel package? I have the same problem.
@lianrzh I don't have one. You can try installing the latest swig (build it from source), and then build this package.
Got same problem, python 3.6, latest webrtc_audio_processing, latest swig (installed from source code), CentOS. Failed to install https://github.com/xiongyihui/python-webrtc-audio-processing/files/2790352/wheel.tar.gz Is there any other way solving it? Thanks!
+1
got same problem,hope for a solution or an updating.
ubuntu 18.04 Python 3.7.13 SWIG Version 4.0.2 Compiled with g++ [x86_64-pc-linux-gnu] Configured options: +pcre
i just resolve it by covert string to bytest:
audio_10ms = '\0' 160 2 audio_out = ap.process_stream(bytes(audio_10ms, encoding='utf-8'))
TypeError: in method 'AudioProcessingModule_process_stream', argument 2 of type 'std::string const &'