endTranscription method
Implementation
@override
Future<void> endTranscription() async {
if (!voiceRecorder.isRecording) {
return;
}
var file = await voiceRecorder.stop();
var transcription = await transcribeFromFile(file);
_streamController.add(transcription);
_streamController.close();
_streamController = StreamController<String>();
}