Skip to content
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

Streaming Concurrent Audio does not work #66

Open
MikeBrooks-NT opened this issue Aug 25, 2022 · 0 comments
Open

Streaming Concurrent Audio does not work #66

MikeBrooks-NT opened this issue Aug 25, 2022 · 0 comments

Comments

@MikeBrooks-NT
Copy link

We are using this plugin, we want to stream the audio data as the user speaks to a server and write to a file. Once we use the following code as the documents indicate is the way to retrieve a concurrent stream.

using (var stream = recorder.GetAudioFileStream())
{

                        // this will begin sending the recording audio data as it continues to record
                        byte[] buffer = new byte[stream.Length];
                        stream.Read(buffer, 0, buffer.Length);
                        //var wav = new WavePcmFormat(buffer, numChannels: 1, sampleRate: 8000, bitsPerSample: 128);
                        //var rawDataWithHeader = wav.ToBytesArray();
                        ws.Send(System.Convert.ToBase64String(buffer, 0, buffer.Length));
                    }

This only sends through one line and stops, it does not send everything while recording. Can you please provide some insight on how to get the whole stream while the recording is happening in real time? Thanks a mil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant