Error with pyaudio

Hello everyone!

I have been following this tutorial:

But I had a problem when I ran the following command: “python deepspeech_test_prediction.py”

The mistake is as follows: “AttributeError: module ‘pyaudio’ has no attribute ‘paInt16’”

Could anyone help me, please?

@Pablo Right!

Can you tell your python version, pyaudio version or you working on Window Machine or Ubuntu?

If you are using import pyaudio or using a pyaudio.py or in which you are using pyaudio (check code for the file) . You can use even use pyInt8 whilst replacing pyaudio.paInt16

Or

Just install pip install pyaudio its is much depends on Python version too i.e 2.7 or 3.X.

Do let me know. I am not expert in this but trying helping you :slight_smile:

Hello @nik202,

I’m working on a virtual machine with ubuntu 20.04. Python version = 3.7

I’ve tried to install with “pip install pyaudio” but I cannot and I don’t why. The following error appears: “ERROR: Command errored out with exit status 1:”

On the code appears, “import pyaudio”.

Thank you very much in advance :slight_smile:

@Pablo try conda install pyaudio ?

Hi @nik202, I have already installed pyaudio. First, I installed portaudio with this command: sudo apt install portaudio19-dev python3-pyaudio Then, I installed pyaudio with pip install pyaudio. But when I ran this command: python deepspeech_test_prediction.py, I had the following error:

“Not found: deepspeech-0.5.1-models/output_graph.pbmm; No such file or directory”

@Pablo share the run file please.

@nik202 this is the deepspeech_test_prediction.py file

Another question for rasa team about the 4th step of this tutorial called " Implementing the text-to-speech component" Upon downloaded the model which consists of config.json and best_model.th.tar, I could see that the second one is an empty file. Is there any problem with this file?