You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the same issue using python 3. Try using this modified version of the example:
# !/usr/bin/env python3fromwebrtc_audio_processingimportAudioProcessingModuleasAPimportnumpyasnpap=AP(enable_vad=True, enable_ns=True)
ap.set_stream_format(16000, 1) # set sample rate and channelsap.set_ns_level(1) # NS level from 0 to 3ap.set_vad_level(1) # VAD level from 0 to 3audio_10ms_array=np.zeros(160, dtype=np.int16)
# only support processing 10ms audio data each timeaudio_out=ap.process_stream(audio_10ms_array.astype(np.int16).tostring())
print('voice: {}'.format(ap.has_voice()))
I don't usually program in python, so perhaps it is not the more direct way to achive the argument as string, but I hope it works also for you.
after build the package, I run the code from Useage,then got a TypError:
TypeError: in method 'AudioProcessingModule_process_stream', argument 2 of type 'std::string const &'
Anyone can help me?
The text was updated successfully, but these errors were encountered: