Member Junction
    Preparing search index...
    • Generates PCM16 mono audio for a digit string: a tone per digit with a silent gap between digits.

      Parameters

      • digits: string

        The digits to send (validated with IsValidDtmfDigits).

      • sampleRate: number = 8000

        Output sample rate in Hz (8000 for a G.711 carrier).

      • toneMs: number = DTMF_TONE_MS

        Tone duration per digit.

      • gapMs: number = DTMF_GAP_MS

        Silence between digits.

      Returns Int16Array

      The PCM16 samples.

      when digits is not valid.