I have a raspberry pi 3 and it is hosting a web server and want to send audio input to it from my laptop mic to the web server that it is hosting for some task to be accomplished. Problem is, it is expecting input from it's own microphone not my laptop's when I access the web server from my laptop's browser using the rpi3's ip address. How can I get it to use my laptop's mic? I am using the python speech_recognition package with google web speech api to transcribe the audio from speech to text and audio is activated with a POST button with the click of a button for the function responsible.
This is my code for now:
import speech_recognition as ak
sp = ak.Recognizer()
with ak.Microphone() as source:
print("Say something!")
audio = sp.listen(source)
try:
value = sp.recognize_google(audio)
except:
pass
Thanks!