How Meetily's Import and Enhance Feature Processes Existing Audio Files

Meetily's import and enhance feature processes existing audio files through an eight-stage pipeline that validates, decodes, resamples, detects speech segments, splits long chunks, transcribes them using Whisper or Parakeet, and persists results to a local database with real-time progress updates.

Meetily is an open-source meeting transcription application that allows users to import existing audio recordings as searchable meetings. The import and enhance feature handles files like MP4, WAV, and MP3 through a Rust-based backend pipeline that ensures high-quality transcription accuracy. This workflow leverages the same audio processing modules used for live recordings but operates in batch mode with detailed progress reporting.

File Selection and Validation

The process begins when the frontend invokes select_and_validate_audio_command, defined in frontend/src-tauri/src/audio/import.rs at lines 16-48. This command opens a file-picker dialog and validates the selected file against several criteria:

  • File existence: Verifies the path points to an existing file
  • Supported extensions: Checks against AUDIO_EXTENSIONS defined in frontend/src-tauri/src/audio/constants.rs
  • Size limit: Ensures the file is under 20 GB
  • Duration extraction: Reads metadata when possible to determine recording length

Only files passing all validation checks proceed to the import pipeline.

The Import Pipeline Architecture

Once validated, the run_import function orchestrates the backend processing. The pipeline follows a sequential flow with explicit progress checkpoints, reusing the same audio processing modules that power live recording but executing them in batch mode.

Stage 1: Meeting Folder Creation and File Copying

The system creates a dedicated meeting folder under the user's recordings directory. The original audio file is copied to this location as audio.{ext} (preserving the original extension). This isolation ensures imported meetings maintain the same folder structure as native recordings.

Relevant code resides in run_import at lines 41-57 of frontend/src-tauri/src/audio/import.rs.

Stage 2: Audio Decoding

The pipeline calls decode_audio_file_with_progress to convert the input file to raw PCM format. During this phase, the system emits progress updates to the frontend, moving the progress bar from 5% to 20%. The decoding callback implementation appears at lines 73-82 of import.rs.

Stage 3: Resampling to Whisper Format

Raw PCM is converted to a 16 kHz mono format using to_whisper_format_with_progress. This standardization ensures compatibility with OpenAI's Whisper model and other transcription engines. Progress updates continue from 20% to 25% during this conversion (lines 104-114).

Stage 4: Voice Activity Detection

The resampled audio feeds into get_speech_chunks_with_progress, which applies Voice Activity Detection (VAD) to isolate speech segments. For batch imports, the system uses a redemption time of 2000 ms to determine speech boundaries. This stage outputs segments with precise timestamps and raw sample data, advancing progress from 25% to 30%.

The VAD implementation appears at lines 130-144 of import.rs, reusing the same engine found in frontend/src-tauri/src/audio/pipeline.rs.

Stage 5: Segment Enhancement via Splitting

The "enhance" aspect of the feature manifests in the split_segment_at_silence logic (lines 122-138). Segments exceeding 25 seconds are automatically split at low-energy points. This prevents mid-word cuts and improves transcription accuracy by ensuring chunks align with natural speech pauses rather than arbitrary time boundaries.

Stage 6: Transcription with Whisper or Parakeet

Each speech segment is transcribed using either WhisperEngine or ParakeetEngine, depending on the user-selected provider specified during import initialization. The system accumulates confidence scores for quality reporting. This transcription loop executes at lines 150-170 of import.rs.

Engine implementations reside in:

Stage 7: Database Persistence and Metadata Writing

The resulting transcripts convert into TranscriptSegment structures and insert into the SQLite database via create_meeting_with_transcripts (lines 184-200). Simultaneously, the system writes transcripts.json and metadata.json files to the meeting folder using write_import_metadata (lines 210-218).

Real-Time Progress Reporting

Throughout the pipeline, emit_progress (lines 240-247) sends import-progress events containing the current stage, percentage completion, and human-readable status messages. The frontend consumes these events to render an "enhance"-style progress UI, providing visibility into which processing stage is active.

Frontend Integration Examples

To initiate an import from the TypeScript frontend:

// Open file-picker, validate, then start import
const fileInfo = await invoke<AudioFileInfo | null>('select_and_validate_audio_command');
if (fileInfo) {
  const result = await invoke<ImportStarted>('start_import_audio_command', {
    source_path: fileInfo.path,
    title: fileInfo.filename,
    language: 'en',               // optional
    model: undefined,            // optional – uses configured default
    provider: 'whisper',         // or 'parakeet'
  });
  console.log(result.message);
}

Listen for progress updates to update the UI:

listen<ImportProgress>('import-progress', (e) => {
  console.log(`[${e.payload.stage}] ${e.payload.progress_percentage}% – ${e.payload.message}`);
});

For backend testing or programmatic access:

let app_handle = /* obtain AppHandle */;

let import_result = meetily::audio::import::start_import(
    app_handle,
    "/path/to/recording.mp4".to_string(),
    "Team Sync".to_string(),
    Some("en".to_string()),
    None,                      // model = default
    Some("whisper".to_string()),
).await?;

println!("Created meeting {} with {} segments", import_result.meeting_id, import_result.segments_count);

Summary

  • Validation gate: The select_and_validate_audio_command function enforces 20 GB size limits and supported extensions before processing begins.
  • Modular reuse: The import pipeline shares decoding, VAD, and splitting logic with live recording features, ensuring consistent behavior across input methods.
  • Intelligent segmentation: Segments longer than 25 seconds split at silence points to prevent transcription errors at chunk boundaries.
  • Engine flexibility: Users can choose between Whisper and Parakeet transcription engines, with confidence scoring for quality metrics.
  • Progress transparency: The emit_progress system provides granular feedback (5% through 100%) across all eight processing stages.
  • Data persistence: Results store in SQLite via create_meeting_with_transcripts and export to JSON files for portability.

Frequently Asked Questions

What audio file formats does Meetily support for import?

Meetily supports common formats including MP4, WAV, and MP3 through the AUDIO_EXTENSIONS constant defined in frontend/src-tauri/src/audio/constants.rs. The validation logic checks file extensions before processing begins.

How does the "enhance" feature improve transcription quality?

The enhancement occurs during the segment splitting stage. Using split_segment_at_silence, the system divides speech segments exceeding 25 seconds at low-energy points rather than arbitrary timestamps. This prevents words from being cut mid-syllable and aligns transcription chunks with natural speech pauses.

What is the maximum file size for imported audio?

The validation logic in select_and_validate_audio_command rejects files larger than 20 GB. This limit ensures sufficient disk space remains for the decoded PCM data and processed meeting folder contents.

Can I use Parakeet instead of Whisper for imported files?

Yes. The start_import_audio_command accepts a provider parameter that accepts either "whisper" or "parakeet". This selection determines whether the transcription loop uses WhisperEngine or ParakeetEngine to process speech segments, with both engines located in their respective src/*_engine/ directories.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →