Discussions

Ask a Question
Back to all

How to send audio bytes via Streaming API? (How to make avatar talk?)

I'm using Flutter and reading bytes at

sampleRate: 16000,
numChannels: 1,
encoder: AudioEncoder.pcm16bits,

But how to send it to websocket? Just raw bytes or base64 encoded audio isn't working. Where to find websocket protocol?

I see that StreamingSDK that uses protobuf but it's in pipecat.json file. So, I cannot generate it using official dart protoc plugin.

Also, StreamingSDK can use lviekit for audio and I tried it in NextJSDemo, but it's not working in LiveKit Flutter plugin.

Did anyone fix this?