Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BSTEncode

Encodes an audio file so that it can be used in Alexa responses, as part of an <audio> tag in an SSML response.

Allows for the use of pre-recorded audio in "regular" (i.e., non-AudioPlayer) skills. More info here.

Once the audio is encoded, BSTEncode uploads it to S3 so it is accessible to Alexa.

Audio is encoded in compliance with Alexa standards: MP3, 48 kbps, 16000 hz

Hierarchy

  • BSTEncode

Index

Constructors

constructor

Methods

encodeFileAndPublish

  • encodeFileAndPublish(filePath: string, callback: function): void
  • Encodes a file and publishes it to S3

    Parameters

    • filePath: string
    • callback: function

      Returns the URL of the encoded file on S3. Error if there is any.

        • (error: Error, encodedURL: string): void
        • Parameters

          • error: Error
          • encodedURL: string

          Returns void

    Returns void

encodeFileAndPublishAs

  • encodeFileAndPublishAs(filePath: string, outputKey: string, callback: function): void
  • Encodes a file and publishes it to S3

    Parameters

    • filePath: string
    • outputKey: string

      The key to publish this as on S3

    • callback: function

      Returns the URL of the encoded file on S3. Error if there is any.

        • (error: Error, encodedURL: string): void
        • Parameters

          • error: Error
          • encodedURL: string

          Returns void

    Returns void

encodeURLAndPublish

  • encodeURLAndPublish(sourceURL: string, callback: function): void
  • Encodes a URL and publishes it to S3

    Parameters

    • sourceURL: string

      The URL of the file to encode

    • callback: function

      Returns the URL of the encoded file on S3. Error if there is any.

        • (error: Error, encodedURL: string): void
        • Parameters

          • error: Error
          • encodedURL: string

          Returns void

    Returns void

encodeURLAndPublishAs

  • encodeURLAndPublishAs(sourceURL: string, outputKey: string, callback: function): void
  • Encodes a URL and publishes it to S3 as the specified key

    Parameters

    • sourceURL: string

      The URL of the file to encode

    • outputKey: string

      The key to publish this as on S3

    • callback: function

      Returns the URL of the encoded file on S3. Error if there is any.

        • (error: Error, encodedURL: string): void
        • Parameters

          • error: Error
          • encodedURL: string

          Returns void

    Returns void

Generated using TypeDoc