Discord Speech Recognition
    Preparing search index...

    Class VoiceMessage

    Index
    audioBuffer: Buffer

    PCM mono 16-bit audio data with 48kHz sample rate

    author: User
    channel: VoiceChannel | StageChannel
    client: Client
    connection: VoiceConnection
    content?: string

    Speech to text translation, empty if nothing was recognized

    duration: number

    Duration in seconds

    error?: Error

    If speech recognition function threw an error, it will be set here

    startTimestamp: number

    When the user started speaking, in milliseconds since the Unix epoch

    • Useful if you want to send audio to some API or play it in browser

      Returns string

      Wav audio encoded to base64

    • Saves audio to .wav file

      Parameters

      • filename: string

        File directory, for example: ./test.wav

      Returns void