Comments (6)
I'm recording direct from the sound card in Mac Os. I'm using https://github.com/ExistentialAudio/BlackHole
After setting this up, use the code below to list all sound devices.
import pyaudio
audio = pyaudio.PyAudio()
device_count = audio.get_device_count()
for i in range(device_count):
device_info = audio.get_device_info_by_index(i)
print(f"Device {i}: {device_info['name']}")
audio.terminate()
The output will be like that.
Device 0: BlackHole 2ch
Device 1: External Microphone
Device 2: External Headphones
Device 3: MacBook Pro Microphone
Device 4: MacBook Pro Speakers
Device 5: Multi-Output Device
Search for sr.Microphone line and add the BlackHole device_index
![Screenshot 2023-07-04 at 13 24 05](https://private-user-images.githubusercontent.com/743040/250954289-b3a4189d-d66a-4548-b61d-285e109bae6a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMxOTE0NTcsIm5iZiI6MTcxMzE5MTE1NywicGF0aCI6Ii83NDMwNDAvMjUwOTU0Mjg5LWIzYTQxODlkLWQ2NmEtNDU0OC1iNjFkLTI4NWUxMDliYWU2YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQxNVQxNDI1NTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MDQxNzAzNmUwMWI5ODJkZjVlODE1YmU3YmEzY2IwYjlhMWMyYzc4YzU3ZmNhZmU4OGE3ZGFlNzk0MDRlZjU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.1l_WKE-oPRMcPZDLsm_yqZHgbKD3zgGaGE1taEa4IAA)
from whisper_real_time.
Looking at the error, the with
statement is failing because source
is None
. Either the line where you set the source was never executed or sr.Microphone()
returned None
because of an error.
from whisper_real_time.
Your sound card probably doesn't support being used as a microphone directly. Sometimes Windows will show speakers along with microphones, but the speakers can't be used for recording. You can try using Stereo Mix or a third part virtual cable like vb-audio. See this post also: davabase/transcriber_app#11
from whisper_real_time.
Hello everyone, I developed a solution so that I can take the microphone or audio from the system using a modified version of PyAudio. I understand that on Mac it could be different, I could help you by modifying this lib and demo.
from whisper_real_time.
so do it lol
from whisper_real_time.
Hello everyone, I developed a solution so that I can take the microphone or audio from the system using a modified version of PyAudio. I understand that on Mac it could be different, I could help you by modifying this lib and demo.
pls post it
from whisper_real_time.
Related Issues (20)
- i'm sure that there's a simple way to get the API to do this but i figured i would ask here HOT 1
- Missing how to use information in readme HOT 2
- Recieve sound data from any application along with the mic in Linux. PR or use your code? HOT 1
- Как использовать видеокарту, а не процессор? HOT 2
- To .exe HOT 6
- UnboundLocalError: local variable 'source' referenced before assignment HOT 3
- Why does it take almost 15000-20000ms latency to deliver the text ? HOT 1
- Irrelevant Output
- whisper real-time from Jetson Nano HOT 2
- WRT on Windows HOT 1
- How to get transcription in a text file HOT 3
- Infinite loop management
- Kudos
- Wow, what a great job. BOL!!!
- Optimal values for the VAD filter?
- Pyaudio install fails when installing requirements.txt HOT 3
- Question about pytorch HOT 1
- Here's how I run it on Mac M2
- Malayalam (ml) didnt work
- how release a mic?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisper_real_time.