M2: tsc-audio, tsc-store and tsctl voice
- tsc-audio: Opus voice/music encoder producing TeamSpeak voice packets, framer, rubato resampling, WAV I/O, tone/Goertzel helpers, cpal capture/playback over lock-free ring buffers; the vendored AudioHandler is the jitter buffer/mixer. - tsc-store: SQLite (bundled, WAL, 0600) with migrations for identities, bookmarks, settings and paged chat history; Secrets trait with memory and OS keyring backends. - tsctl voice send (WAV or tone, real time) / record (mix to WAV, --expect-tone check). The smoke test now includes a voice round-trip: 1 kHz tone ratio ~0.95 on TS3 and TS6. - Dev profile: no debug info for dependencies (target/ 16 GB -> 2.4 GB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
1 parent
301a543c5e
commit
90e05723da
20 files changed
+2379
-35
No files matched your search
@@ -57,6 +57,7 @@ pub async fn run(args: ConnectArgs) -> Result<()> {
|
||||
let cmd = OutCommand::new(Direction::C2S, Flags::empty(), PacketType::Command, command);
|
||||
send_and_wait(&mut con, cmd, "command").await.map(|()| println!("ok"))
|
||||
}
|
||||
Action::Voice { command } => crate::voice::run(&mut con, command).await,
|
||||
Action::Repl => repl(&mut con).await,
|
||||
};
|
||||
|
||||
@@ -65,14 +66,14 @@ pub async fn run(args: ConnectArgs) -> Result<()> {
|
||||
}
|
||||
|
||||
/// What to do after handling one stream item.
|
||||
enum Flow {
|
||||
pub(crate) enum Flow {
|
||||
Continue,
|
||||
Stop,
|
||||
}
|
||||
|
||||
/// How [`pump`] ended.
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
enum PumpEnd {
|
||||
pub(crate) enum PumpEnd {
|
||||
Stopped,
|
||||
Deadline,
|
||||
Interrupted,
|
||||
@@ -80,7 +81,7 @@ enum PumpEnd {
|
||||
|
||||
/// Drive the connection, handing every item to `handler` until it returns
|
||||
/// [`Flow::Stop`], the deadline passes, or Ctrl-C is pressed.
|
||||
async fn pump(
|
||||
pub(crate) async fn pump(
|
||||
con: &mut Connection,
|
||||
deadline: Option<Instant>,
|
||||
mut handler: impl FnMut(&mut Connection, StreamItem) -> Result<Flow>,
|
||||
|
||||
Reference in new issue
Block a user