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

    Class AstericsGridProcessor

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • Add audio recording to a specific grid element

      Parameters

      • filePath: string
      • elementId: string
      • audioData: Buffer
      • Optionalmetadata: string

      Returns void

    • 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 grid file with audio recordings added

      Parameters

      • sourceFilePath: string
      • targetFilePath: string
      • audioMappings: Map<string, { audioData: Buffer; metadata?: string }>

      Returns void

    • Extract all element IDs from the grid file for audio mapping

      Parameters

      • filePathOrBuffer: string | Buffer

      Returns string[]

    • Check if an element has audio recording

      Parameters

      • filePathOrBuffer: string | Buffer
      • elementId: string

      Returns boolean