tap-sdk-js
    Preparing search index...

    Type Alias AudioRequestHandle

    Represents handle with audio request information and respond function.

    type AudioRequestHandle = {
        data: string;
        parameters: Record<string, string>;
        respond: AudioResponseFunction;
        respondError: AudioResponseErrorFunction;
    }
    Index

    Properties

    data: string

    Content of the audio request.

    parameters: Record<string, string>

    A parameter map.

    respond: AudioResponseFunction

    Respond an audio to the audio request.

    The stream or equivalent.

    Nothing

    import * as fs from 'node:fs'

    const stream = fs.createReadStream('foo.mp3')
    req.respond(stream)
    respondError: AudioResponseErrorFunction

    Respond a error to the audio request.

    The error message.

    Nothing

    req.respondError("Alice")