Skip to content

Can't play audio buffer returned from @google-cloud/text-to-speech #28

@thegoatherder

Description

@thegoatherder

Google Cloud Text to Speech returns a response.audioContent which logs to console as:

<Buffer ff f3 44 c4 00 12 6a d5 44 01 41 10 01 c6 37 00 20 8c 6c 80 04 05 fe 84 6a 9c ef f3 9f 39 f2 10 9f e4 24 8d bf fc e7 79 cf 21 09 c9 53 9e 42 49 53 ba ... 4846 more bytes>

Running this:

let playback = play(response.audioContent);
playback.play();

Errors out with:

Error: Argument should be an audio buffer

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions