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
- encodeFileAndPublishAs
- encodeURLAndPublish
- encodeURLAndPublishAs

## Constructors

### constructor

- new BSTEncode(configuration: IEncoderConfig): BSTEncode

- - Defined in client/bst-encode.ts:43

  The configuration contains AWS credentials and S3 bucket to upload to It also contains the volume parameter - for manipulating the volume of the encoded file

  #### Parameters

  - ##### configuration: IEncoderConfig

  #### Returns BSTEncode

## Methods

### encodeFileAndPublish

- encodeFileAndPublish(filePath: string, callback: function): void

- - Defined in client/bst-encode.ts:63

  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

### encodeFileAndPublishAs

- encodeFileAndPublishAs(filePath: string, outputKey: string, callback: function): void

- - Defined in client/bst-encode.ts:73

  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

### encodeURLAndPublish

- encodeURLAndPublish(sourceURL: string, callback: function): void

- - Defined in client/bst-encode.ts:91

  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

### encodeURLAndPublishAs

- encodeURLAndPublishAs(sourceURL: string, outputKey: string, callback: function): void

- - Defined in client/bst-encode.ts:101

  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

Generated using TypeDoc