use std::path::PathBuf;

use tokio::sync::mpsc;

pub mod canary;
pub mod ffmpeg;
pub mod ollama;
pub mod recovery;
pub mod whisper;
pub mod worker;

pub const QUEUE_DEPTH: usize = 64;

#[derive(Debug, Clone)]
pub struct TranscribeJob {
    pub audio_path: PathBuf,
    /// Slug of the user who owns this recording. Used by the worker to look up
    /// the per-user transcription language.
    pub user_slug: String,
}

pub type TranscribeSender = mpsc::Sender<TranscribeJob>;
pub type TranscribeReceiver = mpsc::Receiver<TranscribeJob>;

pub fn channel() -> (TranscribeSender, TranscribeReceiver) {
    mpsc::channel(QUEUE_DEPTH)
}
