Understanding the Retranscription Workflow for Reprocessing Recordings in Meetily
Meetily’s retranscription workflow is an async Rust-based process that re-runs Whisper transcription on existing recordings using Tauri commands, emitting real-time progress events while guarding against concurrent jobs.
Meetily provides a robust retranscription workflow for reprocessing recordings when you need to update language settings, switch models, or fix incomplete transcripts. This beta-gated feature, implemented in the Rust-based Tauri backend of the Zackriya-Solutions/meetily repository, allows you to regenerate meeting transcripts without re-recording audio.
Core Architecture and Source Files
The workflow centers on three Tauri commands registered in [frontend/src-tauri/src/lib.rs](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/lib.rs) (lines 742‑744):
start_retranscription– Launches a background retranscription job (retransmission.rs:89‑90)cancel_retranscription– Aborts an in-progress job (retransmission.rs:84‑85)is_retranscription_in_progress– Returns whether a job is currently running (retransmission.rs:80‑81)
Key implementation files include:
frontend/src-tauri/src/audio/retransmission.rs– Core orchestration, guard patterns, and event emissionfrontend/src-tauri/src/lib.rs– Command registration and handler setupfrontend/src-tauri/src/whisper_engine/whisper_engine.rs– Whisper model loading and inferencefrontend/src-tauri/src/database/repositories/transcript.rs– SQLite persistence for generated transcripts
Step-by-Step Retranscription Process
Initialization and Guard Setup
The process begins when the frontend invokes start_retranscription_command. The function immediately sets a global atomic flag RETRANSLATION_IN_PROGRESS using a RetranscriptionGuard struct. This guard prevents concurrent retranscription jobs from running simultaneously and automatically clears the flag when dropped, ensuring thread-safe cleanup even if the task panics.
Parameter Validation
Before spawning the background worker, the system validates that the selected LLM provider supports Whisper transcription. If the provider lacks Whisper capabilities (for example, non-local providers), the function emits a retranscription-error event and returns early without spawning the task.
Background Task Execution
Upon validation, the command spawns a Tokio task that executes run_retranscription. This function performs the following steps:
- Loads the Whisper model via
whisper_engine::WhisperEngine::load_model - Decodes the original audio file using the shared
audio::decodermodule - Iterates over audio chunks filtered by Voice Activity Detection (VAD)
- Feeds valid chunks to the Whisper engine for transcription
Event Emission and Progress Tracking
During processing, the system emits structured events to the frontend via Tauri’s event system:
retranscription-progress– Sent after each audio chunk is processed (line 510)retranscription-complete– Fired when transcription finishes successfully (line 116)retranscription-error– Emitted on failures or invalid provider configurations (line 127)
Metadata Persistence
Upon successful completion, write_retranscription_metadata updates the meeting’s metadata.json with a retranscribed_at timestamp and a source: "retranscription" marker (lines 723‑756). The newly generated transcript is then persisted to the local SQLite database via the transcript repository.
Frontend Integration Example
To trigger a retranscription from the frontend, invoke the Tauri command with the meeting ID and desired configuration:
import { invoke } from '@tauri-apps/api/tauri';
import { listen } from '@tauri-apps/api/event';
// Start the retranscription workflow
async function reprocessRecording(meetingId: string) {
try {
await invoke('start_retranscription', {
meetingId,
language: 'en',
model: 'medium',
provider: 'local',
});
} catch (error) {
console.error('Failed to start retranscription:', error);
}
}
// Listen for progress updates
listen<number>('retranscription-progress', (event) => {
console.log(`Progress: ${event.payload}%`);
});
// Handle completion
listen('retranscription-complete', () => {
console.log('Retranscription finished');
// Reload transcript from the database
});
// Check if a job is currently running
const isRunning = await invoke<boolean>('is_retranscription_in_progress');
Cancellation Support
To cancel an in-progress job, invoke the cancel command:
await invoke('cancel_retranscription');
This triggers cancel_retranscription_command, which aborts the running Tokio task and clears the RETRANSLATION_IN_PROGRESS flag, allowing immediate cleanup and subsequent job starts.
Summary
- The retranscription workflow is guarded by an atomic flag to prevent concurrent jobs from corrupting state
- Three Tauri commands expose the functionality:
start_retranscription,cancel_retranscription, andis_retranscription_in_progress - Background tasks run in Tokio and emit
retranscription-progress,retranscription-complete, andretranscription-errorevents - Metadata files are updated with timestamps and source markers upon completion
- Full source implementation resides in
frontend/src-tauri/src/audio/retransmission.rs
Frequently Asked Questions
What is the retranscription workflow for reprocessing recordings in Meetily?
The retranscription workflow is an async Rust-based process that re-runs Whisper transcription on existing meeting audio files. It allows users to regenerate transcripts when changing languages or models, implemented in the Tauri backend and exposed via commands like start_retranscription that communicate with the frontend through events.
How does Meetily prevent concurrent retranscription jobs?
Meetily uses a global atomic flag RETRANSLATION_IN_PROGRESS managed by a RetranscriptionGuard struct in retransmission.rs. This guard ensures only one retranscription runs at a time and automatically clears the flag when the operation completes, errors, or is cancelled.
Which events does the frontend receive during retranscription?
The frontend receives three events: retranscription-progress containing percentage completion, retranscription-complete signaling successful finish, and retranscription-error indicating failures or unsupported provider configurations. These are emitted from the Rust core using Tauri’s event system.
Can I cancel a retranscription after it starts?
Yes. The cancel_retranscription command immediately aborts the running Tokio task and clears the progress flag. This allows you to start a new job or exit cleanly without waiting for the current transcription to finish.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →