This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const textToSpeech = require('@google-cloud/text-to-speech'); | |
const fs = require('fs'); | |
async function streamTextToSpeech(texts: string[]) { | |
const client = new textToSpeech.TextToSpeechClient(); | |
const ttsStream = client.streamingSynthesize(); | |
// Write the response to a file, replace with your desired output stream |