@willwade/aac-processors
    Preparing search index...

    Class SnapProcessor

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • Add audio recording to a button in the database

      Parameters

      • dbPath: string
      • buttonId: number
      • audioData: Buffer
      • Optionalmetadata: string

      Returns number

    • Helper method to add extracted strings to the map, handling duplicates

      Parameters

      • extractedMap: Map<string, ExtractedString>

        Map to store extracted strings

      • key: string

        Lowercase key for deduplication

      • originalString: string

        Original string with proper casing

      • vocabLocation: VocabLocation

        Metadata about where the string was found

      Returns void

    • Create a copy of the pageset with audio recordings added

      Parameters

      • sourceDbPath: string
      • targetDbPath: string
      • audioMappings: Map<number, { audioData: Buffer; metadata?: string }>

      Returns void

    • Extract buttons from a specific page that need audio recordings

      Parameters

      • dbPath: string
      • pageUniqueId: string

      Returns { hasAudio: boolean; id: number; label: string; message: string }[]

    • Parameters

      • filePathOrBuffer: string | Buffer
      • translations: Map<string, string>
      • outputPath: string

      Returns Buffer