Giter Club home page Giter Club logo

Comments (6)

wprudencio avatar wprudencio commented on August 11, 2024 2

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

from whisper_real_time.

davabase avatar davabase commented on August 11, 2024

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.

davabase avatar davabase commented on August 11, 2024

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.

NicoLiendro14 avatar NicoLiendro14 commented on August 11, 2024

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.

martinshkreli avatar martinshkreli commented on August 11, 2024

so do it lol

from whisper_real_time.

g-l-i-t-c-h-o-r-s-e avatar g-l-i-t-c-h-o-r-s-e commented on August 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.