FlutterFlow Custom Action – Automatic silence detection with flutter_recorder not completing

Database & APIs
Resolved

Hello FlutterFlow Community,

We are developing Coachia, an AI coaching application with a voice-based AI coach.

We are trying to implement automatic end-of-speech detection so that the user can speak naturally without pressing a Stop button.

The expected flow is:

Start recording → user speaks → detect approximately 2 seconds of silence → automatically stop recording → return an FFUploadedFile → send the audio to our backend for transcription.

We currently use a FlutterFlow Custom Action with flutter_recorder ^1.1.3.

The action compiles successfully with 0 errors, but when executed on Android it does not complete and therefore never returns the FFUploadedFile.

We would like to know the recommended and reliable way to implement silence detection / end-of-speech detection (VAD) in FlutterFlow.

What have you tried so far?

We have made two implementation attempts using flutter_recorder ^1.1.3.

Our current Custom Action:

  • initializes Recorder.instance with PCMFormat.f32le, 22050 Hz and mono audio;

  • creates a temporary WAV file;

  • uses setSilenceDetection();

  • uses setSilenceDuration(2.0);

  • uses setSilenceThresholdDb(-27.0);

  • ignores the initial silence until speech is detected;

  • calls stopRecording() after silence;

  • reads the WAV bytes and returns an FFUploadedFile;

  • includes a 20-second maximum-duration timeout.

The Custom Action compiles with 0 FlutterFlow errors.

We also isolated it from our main microphone workflow using a dedicated Test Silence button:

Show Snack Bar "V5 démarrage" → recordUntilSilenceV5 → Show Snack Bar "Audio V5 capturé"

The first Snack Bar appears, confirming that the FlutterFlow Action Flow reaches the Custom Action. However, the Custom Action never completes, the second Snack Bar never appears, and even the 20-second timeout does not appear to return control to the FlutterFlow Action Flow.

Before attempting a third implementation, we would like to know whether flutter_recorder is appropriate for this use case in FlutterFlow, or whether another package / architecture is recommended for reliable VAD or end-of-speech detection on Android and later iOS.

Did you check FlutterFlow's Documentation for this topic?
No
1
5 replies