File tree 1 file changed +8
-9
lines changed
packages/google-cloud-texttospeech/samples
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 15
15
16
16
'use strict' ;
17
17
18
- async function main ( ) {
19
- // [START tts_quickstart]
20
- const fs = require ( 'fs' ) ;
21
- const util = require ( 'util' ) ;
22
-
23
- // Imports the Google Cloud client library
24
- const textToSpeech = require ( '@google-cloud/text-to-speech' ) ;
18
+ // [START tts_quickstart]
19
+ // Imports the Google Cloud client library
20
+ const textToSpeech = require ( '@google-cloud/text-to-speech' ) ;
25
21
22
+ // Import other required libraries
23
+ const fs = require ( 'fs' ) ;
24
+ const util = require ( 'util' ) ;
25
+ async function main ( ) {
26
26
// Creates a client
27
27
const client = new textToSpeech . TextToSpeechClient ( ) ;
28
28
@@ -44,7 +44,6 @@ async function main() {
44
44
const writeFile = util . promisify ( fs . writeFile ) ;
45
45
await writeFile ( 'output.mp3' , response . audioContent , 'binary' ) ;
46
46
console . log ( 'Audio content written to file: output.mp3' ) ;
47
- // [END tts_quickstart]
48
47
}
49
-
48
+ // [END tts_quickstart]
50
49
main ( ) . catch ( console . error ) ;
You can’t perform that action at this time.
0 commit comments