diff --git a/README.md b/README.md index cf36fe5..bdf1177 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ AudioTee captures your Mac's system audio output and writes chunks of it to `std By default, it taps the audio output from **all** running process and selects the most appropriate audio chunk output format to use based on the presence of a tty. Tap output is forced to `mono` (not configurable) and preserves your output device's sample rate unless you pass a `--convert-to` flag. Only the default output device is currently supported. -My original (and so far only) use case is streaming audio to a parent process which communicates with a realtime ASR service, so AudioTee makes some design decisions you might not agree with. Open an issue or a PR and we can talk about changing them. I'm also no Swift developer, so contributions improving codebase idioms and general hygiene are welcome. +My original (and so far only) use case is streaming audio to a parent process which communicates with a realtime ASR service, so AudioTee makes some design decisions you might not agree with. Open an issue or a PR and we can talk about them. I'm also no Swift developer, so contributions improving codebase idioms and general hygiene are welcome. Recording system audio is harder than it should be on macOS, and folks often wrestle with outdated advice and poorly documented APIs. It's a boring problem which stands in the way of lots of fun applications. There's more code here than you need to solve this problem yourself: the main classes of interest are probably `Core/AudioTapManager` and `Core/AudioRecorder`. Everything's wired together in `CLI/AudioTee`. The rest is just CLI configuration support, output formatting logic, and some utility functions you could probably live without. diff --git a/Sources/Output/Handlers/BinaryOutputHandler.swift b/Sources/Output/Handlers/BinaryOutputHandler.swift index 78b6876..7f4e7bb 100644 --- a/Sources/Output/Handlers/BinaryOutputHandler.swift +++ b/Sources/Output/Handlers/BinaryOutputHandler.swift @@ -6,7 +6,7 @@ public class BinaryAudioOutputHandler: AudioOutputHandler { public func handleAudioPacket(_ packet: AudioPacket) { // Create metadata without the audio data - let metadata = AudioPacketMetadata(from: packet) + let metadata = BinaryPacketHeader(from: packet) // Write JSON metadata line Logger.writeMessage(.audio, data: metadata) diff --git a/Sources/Output/OutputPacketTypes.swift b/Sources/Output/OutputPacketTypes.swift index 4c2bc7a..205a68b 100644 --- a/Sources/Output/OutputPacketTypes.swift +++ b/Sources/Output/OutputPacketTypes.swift @@ -23,7 +23,7 @@ public struct JSONAudioPacket: Codable { } /// Metadata-only packet for binary output (without base64 audio data) -public struct AudioPacketMetadata: Codable { +public struct BinaryPacketHeader: Codable { public let timestamp: Date public let duration: Double public let peakAmplitude: Float