peetzweg / aves

0 stars 0 forks source link

Generate Audio File from Text using AWS Polly #2

Closed peetzweg closed 7 years ago

peetzweg commented 7 years ago

Write a Javascript programm which uses aws polly to generate the audio file for a given text

peetzweg commented 7 years ago

Super duper easy

const synthesize = text => {
    const params = {
        OutputFormat: "mp3",
        SampleRate: "8000",
        Text: text,
        TextType: "text",
        VoiceId: "Joey"
    };

    const polly = new Polly();
    return polly.synthesizeSpeech(params).promise();
};