EngineConfig (engine.rs)

call-translator · voice, pipeline-coordination, audio-routing, stt-tts-translation, realtime

Main engine coordinator. ! ! Two pipelines: ! OUTGOING: Mic -> Deepgram(ru) -> Translate(ru->en) -> TTS(en) -> Speakers ! INCOMING: BlackHole 16ch -> Deepgram(en) -> Translate(en->ru) -> TTS(ru) -> Speakers

// Source: https://github.com/LetovKai/call-translator | License: MIT | Copyright 2026 Kai Letov
// Provided via justclaw.it.com; keep this notice with the code.
//! Main engine coordinator.
//!
//! Two pipelines:
//!   OUTGOING: Mic -> Deepgram(ru) -> Translate(ru->en) -> TTS(en) -> Speakers
//!   INCOMING: BlackHole 16ch -> Deepgram(en) -> Translate(en->ru) -> TTS(ru) -> Speakers

use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::thread;
use std::time::Instant;

use anyhow::{Context, Result};
use crossbeam_channel::{bounded, Sender};
use log::{error, info, warn};

use crate::audio;
use crate::audio::capture::{AudioCapture, AudioChunk};
use crate::audio::playback::AudioPlayback;
use crate::protocol::Event;
use crate::stt::DeepgramStt;
use crate::translation::{Tra

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key