Skip to main content

shift_preflight/inspector/
audio.rs

1//! Audio inspection (v2).
2//!
3//! Future capabilities:
4//! - Detect audio format (MP3, WAV, OGG, FLAC)
5//! - Extract duration, sample rate, bitrate, channels
6//! - Estimate transcription token cost
7
8use super::ImageMetadata;
9use anyhow::Result;
10
11/// Inspect audio bytes and extract metadata.
12///
13/// **Not yet implemented.** Returns an error indicating audio support is planned for v2.
14pub fn inspect_bytes(_data: &[u8]) -> Result<ImageMetadata> {
15    anyhow::bail!("audio inspection is not yet supported (planned for v2)")
16}
17
18#[cfg(test)]
19mod tests {
20    use super::*;
21
22    #[test]
23    fn test_audio_not_supported() {
24        let result = inspect_bytes(b"fake audio data");
25        assert!(result.is_err());
26        assert!(result
27            .unwrap_err()
28            .to_string()
29            .contains("not yet supported"));
30    }
31}