MeloTTS voice output, signal handling, auto pipeline
- melo_server.py subprocess (MeloTTS v3 EN-Newest, speed 1.3): line protocol stdin->stdout, model loaded once, warmup before READY - src/melo.zig: lifecycle ownership (spawn/kill with inferon), line protocol client, reply sanitizer (newlines/markdown stripped before synthesis) - SIGINT/SIGTERM handlers: async-signal-safe kill of whisper/melo/recorder, default disposition restored + re-raise for truthful exit status - processUtterance: transcribe->infer->speak chains automatically after stop-click; mid-pipeline clicks are no-ops; back to idle after reply - temp cleanup: recording WAV deleted after transcription, TTS WAV after playback - whisper: pid() export for signal handler 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
This commit is contained in:
1 parent
3ddb0e77bc
commit
90b59e20f3
4 files changed
+362
-42
No files matched your search
@@ -52,6 +52,12 @@ pub fn start(alloc: std.mem.Allocator, io: Io, log_dir: []const u8) !void {
|
||||
if (child) |*c| std.debug.print("inferon/whisper: spawned pid {?d}\n", .{c.id});
|
||||
}
|
||||
|
||||
/// PID of the whisper-server child, or null. For signal handlers that must
|
||||
/// only use async-signal-safe calls.
|
||||
pub fn pid() ?std.process.Child.Id {
|
||||
return if (child) |c| c.id else null;
|
||||
}
|
||||
|
||||
/// Kill the whisper-server child (called on quit paths).
|
||||
pub fn stop() void {
|
||||
const io = io_ctx orelse return;
|
||||
|
||||
Reference in new issue
Block a user