- Implement faster-whisper TranscribeService with word-level timestamps, progress reporting, and hardware auto-detection - Wire up Rust SidecarManager for Python process lifecycle (spawn, IPC, shutdown) - Add transcribe_file Tauri command bridging frontend to Python sidecar - Integrate wavesurfer.js WaveformPlayer with play/pause, skip, seek controls - Build TranscriptEditor with word-level click-to-seek and active highlighting - Connect file import flow: prompt → asset load → transcribe → display - Add typed tauri-bridge service with TranscriptionResult interface - Add Python tests for hardware detection and transcription result formatting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
542 B
Rust
17 lines
542 B
Rust
use std::io::Write;
|
|
|
|
use super::messages::IPCMessage;
|
|
|
|
/// Serialize and write an IPC message to a writer (stdin pipe).
|
|
pub fn send_message<W: Write>(writer: &mut W, msg: &IPCMessage) -> Result<(), String> {
|
|
let json = serde_json::to_string(msg).map_err(|e| e.to_string())?;
|
|
writer
|
|
.write_all(json.as_bytes())
|
|
.map_err(|e| format!("Write error: {e}"))?;
|
|
writer
|
|
.write_all(b"\n")
|
|
.map_err(|e| format!("Write error: {e}"))?;
|
|
writer.flush().map_err(|e| format!("Flush error: {e}"))?;
|
|
Ok(())
|
|
}
|