Skip to main content
deleted 1 character in body
Source Link
Trees
  • 1.3k
  • 13
  • 22

Most probably you are using Mac OS. I had the similar issue, because I was using Atom editor to run the python code. Try to run your code from the terminal of Mac OS (or Power Shell if you are using windows), (in case a popup appears for access to microphone on Mac OS, press Ok). Thats it! your code will record fine. As a tester, please run the code below to check if you can visualize the sound, and make surersure to run it through Terminal (No editors or IDEs).

Most probably you are using Mac OS. I had the similar issue, because I was using Atom editor to run the python code. Try to run your code from the terminal of Mac OS (or Power Shell if you are using windows), (in case a popup appears for access to microphone on Mac OS, press Ok). Thats it! your code will record fine. As a tester, please run the code below to check if you can visualize the sound, and make surer to run it through Terminal (No editors or IDEs).

Most probably you are using Mac OS. I had the similar issue, because I was using Atom editor to run the python code. Try to run your code from the terminal of Mac OS (or Power Shell if you are using windows), (in case a popup appears for access to microphone on Mac OS, press Ok). Thats it! your code will record fine. As a tester, please run the code below to check if you can visualize the sound, and make sure to run it through Terminal (No editors or IDEs).

added 101 characters in body
Source Link
Trees
  • 1.3k
  • 13
  • 22

Your code is working fine. The problem you are facing is due to the admin rights. The audio file has constant 0 data, therefore, you can't listen to sound in the generated wav file. I suppose your microphone device is installed and working properly. If you are not sure about the audio installation status, then as per operating system do these steps:

Your code is working fine. The problem you are facing is due to the admin rights. I suppose your microphone device is installed and working properly. If you are not sure about the audio installation status, then as per operating system do these steps:

Your code is working fine. The problem you are facing is due to the admin rights. The audio file has constant 0 data, therefore, you can't listen to sound in the generated wav file. I suppose your microphone device is installed and working properly. If you are not sure about the audio installation status, then as per operating system do these steps:

added 219 characters in body
Source Link
Trees
  • 1.3k
  • 13
  • 22

Save this file as voice.py to a folder (let say AUDIO). Then cd to AUDIO folder from the terminal command and then execute it using:

python3 voice.py

or

python voice.py

depending on your python env name.

enter image description here

enter image description here

Save this file as voice.py to a folder (let say AUDIO). Then cd to AUDIO folder from the terminal command and then execute it using:

python3 voice.py

or

python voice.py

depending on your python env name.

enter image description here

added 271 characters in body
Source Link
Trees
  • 1.3k
  • 13
  • 22
Loading
added 344 characters in body
Source Link
Trees
  • 1.3k
  • 13
  • 22
Loading
Source Link
Trees
  • 1.3k
  • 13
  • 22
Loading