Skip to content

Is there a way to close the source without going through Context Manager #841

@sapienza88

Description

@sapienza88

You document using the microphone through :

import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:             
    audio = r.listen(source)  

But is there a way to initiate and "close" the microphone using Python ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions