@@ -197,6 +197,11 @@ async function asyncRecognize(
197
197
sampleRateHertz : sampleRateHertz ,
198
198
languageCode : languageCode ,
199
199
} ;
200
+
201
+ /**
202
+ * Note that transcription is limited to 60 seconds audio.
203
+ * Use a GCS file for audio longer than 1 minute.
204
+ */
200
205
const audio = {
201
206
content : fs . readFileSync ( filename ) . toString ( 'base64' ) ,
202
207
} ;
@@ -528,7 +533,7 @@ async function syncRecognizeModelSelectionGCS(
528
533
audio : audio ,
529
534
} ;
530
535
531
- // Detects speech in the audio file
536
+ // Detects speech in the audio file.
532
537
const [ response ] = await client . recognize ( request ) ;
533
538
const transcription = response . results
534
539
. map ( result => result . alternatives [ 0 ] . transcript )
@@ -549,6 +554,7 @@ async function syncRecognizeWithAutoPunctuation(
549
554
* TODO(developer): Update client library import to use new
550
555
* version of API when desired features become available
551
556
*/
557
+
552
558
const speech = require ( '@google-cloud/speech' ) ;
553
559
const fs = require ( 'fs' ) ;
554
560
@@ -568,6 +574,7 @@ async function syncRecognizeWithAutoPunctuation(
568
574
languageCode : languageCode ,
569
575
enableAutomaticPunctuation : true ,
570
576
} ;
577
+
571
578
const audio = {
572
579
content : fs . readFileSync ( filename ) . toString ( 'base64' ) ,
573
580
} ;
0 commit comments