How to process the audio stream?
Is your feature request related to a problem? Please describe. Hi~Dear flutter sound team,
I want to do a function really like the streamLoop example, which could get the audio stream and then player play the stream. Now I have the question about how I access and process the stream?
I see the example streamLoop example, which write
Future<void> record() async {
await _mPlayer!.startPlayerFromStream(
codec: Codec.pcm16,
numChannels: 1,
sampleRate: _sampleRatePlayer,
);
await _mRecorder!.startRecorder(
codec: Codec.pcm16,
toStream: _mPlayer!.foodSink, // ***** THIS IS THE LOOP !!! *****
sampleRate: _sampleRateRecorder,
numChannels: 1,
);
setState(() {});
}
It sounds like _mPlayer!.foodSink is the stream what I want to process, but how can I transfer it from Instance of '_StreamSinkWrapper<Food>' to an instance of array, which format is easy to calculate and change, and transfer back to palyer?
For example, If i want to calculate _mPlayer!.foodSink*2 then play it, what should I do?
Do you have any suggestion?
Thanks guys, I solved the problem, thanks for your amazing examples!
@ShuoShenDe I'm working on process the audio stream also. how did you solved the problem ? can share your way to do it ? Store the stream from the recorder -> process them part by part -> then feed to player ?
This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.