Open islom9797 opened 1 year ago
it work
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.
This issue is stale because it has been open 365 days with no activity. Leave a comment or this will be closed in 7 days.
@islom9797 Hi, have you happen to make this work? I'm also facing the same issue
@Larpoux @RitchieP @islom9797
Having same issue.
` void startRecorder() async {
if (_mRecorder!.recorderState == RecorderState.isPaused) {
resumeRecorder();
return;
}
Directory tempDir = await getApplicationDocumentsDirectory();
_mRecorder!
.startRecorder(
toFile: '${tempDir.path}/audio.wav',
codec: Codec.pcm16WAV,
audioSource: theSource,
)
.then((value) {
setState(() {
_isRecording = true;
context.read
void stopRecorder() async {
await _mRecorder!.stopRecorder().then((value) {
context.read
value is empty string when recording is stopped. @sofakeer please reply if you can help
Actually, I know that there is a bug in Flutter Sound when the App tries to use the File Path returned by stopRecorder().
This is perhaps the reason for your issue. I will work on that point tomorrow. Sorry for the bug.
It's been quite a while since I worked on my project that required voice recording. I managed to make it work towards the end but I forgot what was the exact issue.
But I can share the link to my source code if you'd like to have a look.
https://github.com/RitchieP/VerbaLex/blob/main/verbalex/lib/utils/record_voice.dart
I am currently in the process of releasing a new flutter sound version with a bug fixed on Android with PCM16-WAV. The new version will be accessible in half an hour. I think that it will solve your issue.
Flutter Sound 9.16.1 is released :
Issue fixed. Thanks @Larpoux. very much appreciated man
How to record in .wav format audio
Here is my question :
String path = tempDir.path + '/audio.wav'; mRecorder?.startRecorder(toFile: path, codec: Codec.pcm16WAV) this source dont give any error but when I stop record value(path of recorded audio) is empty
await mRecorder!.stopRecorder().then((value) async { print('value on stopRecord $value');