-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create a PullAudioInputStreamCallback for translate #95
Comments
not sure I understand your scenario ... somewhere the audiostream you are hearing is created. You have to intercept it and send it to the SDK. There are programs that intercept playing audio (on Windows) and capture it. To my knowledge they are injecting themselves into the audio pipeline or have their own audio drivers. this functionality is not supplied by the sdk thx |
I can capture audio playing with speaker with WasapiLoopbackCapture, privide by CScore. and can write the captured stream to a Wav file with buffer, the stream is 16000 samplepersecond, 16 bit, and 1 channel. //code
|
looks like you have in the 'buffer' the audio which you write in the stream? You need the wave-file header also, that needs to be transmitted to the service (the size isn't relevant). there will be a new push/pull audio stream sample published in this repo later this week. Wolfgang |
@wolfma61 Thank you. I will try to add wave-file header to the stream before write data from "buffer". |
@wolfma61 I tried add Wave header to the stream before write audio data to the stream, recognizer still not work can you help to check the code:
|
Can you get the sample for AudioPullInputStream work? You can also try with AudioPushInputstream, like sample here. |
Hi @DennisLJ ,
the sample size must be 16bits, i.e., converting to 32bit will not work. |
@DennisLJ - is this solved? |
assuming solved? |
Hi @DennisLJ , |
I want to capture audio loopback, and make it as source for recognizer.
with C# How could I create a PullAudioInputStreamCallback to capture active speaker as input source ?
The text was updated successfully, but these errors were encountered: