stopAudioRecording method
Stops recording that has already started.
すでに開始されている録音を停止します。
Implementation
Future<void> stopAudioRecording() async {
if (_engine == null) {
throw Exception(
"The engine is not initialized. [connect] the engine first.",
);
}
if (_recordingAudio == null) {
return;
}
try {
await _engine?.stopAudioRecording();
if (!_disposed) {
notifyListeners();
}
_recordingAudio?.complete();
_recordingAudio = null;
} catch (e) {
_recordingAudio?.completeError(e);
_recordingAudio = null;
rethrow;
}
}