word (ParleyKit/AudioPeaks.swift)

parley · ios/ParleyKit/Sources/ParleyKit/AudioPeaks.swift · swift · Apache-2.0
voice, tag:knn-classified

Module exposing: word

// Source: https://github.com/pathorsAI/parley | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import AudioToolbox
import Foundation

public enum AudioPeaksError: Error, Equatable {
    /// AudioToolbox could not open the file, or could not be persuaded to hand
    /// back 16 kHz mono float.
    case unreadable(String)
    /// The file opened but decoded to nothing.
    case empty
    /// A cache file that is not one of ours, or is truncated.
    case corruptCache
    /// `isCancelled` said so. Not `Swift.CancellationError`, because `compute`
    /// is a blocking synchronous function with no Task to cancel — the caller
    /// owns that decision and passes it in.
    case cancel

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key