@@ -52,7 +52,7 @@ public static void main(String... args) throws Exception {
5252 System .out .printf (
5353 "\t java %s \" <command>\" \" <path-to-image>\" \n "
5454 + "Commands:\n "
55- + "\t syncrecognize | asyncrecognize | streamrecognize | wordoffsets\n "
55+ + "\t syncrecognize | asyncrecognize | streamrecognize | wordoffsets | model-selection \n "
5656 + "Path:\n \t A file path (ex: ./resources/audio.raw) or a URI "
5757 + "for a Cloud Storage resource (gs://...)\n " ,
5858 Recognize .class .getCanonicalName ());
@@ -82,11 +82,11 @@ public static void main(String... args) throws Exception {
8282 }
8383 } else if (command .equals ("streamrecognize" )) {
8484 streamingRecognizeFile (path );
85- } else if (command .equals ("video " )) {
85+ } else if (command .equals ("model-selection " )) {
8686 if (path .startsWith ("gs://" )) {
87- transcribeGcsVideoFile (path );
87+ transcribeModelSelectionGcs (path );
8888 } else {
89- transcribeVideoFile (path );
89+ transcribeModelSelection (path );
9090 }
9191 }
9292 }
@@ -420,10 +420,10 @@ public SettableFuture<List<T>> future() {
420420 // [START speech_transcribe_model_selection]
421421 /**
422422 * Performs transcription of the given audio file synchronously with
423- * video as the original media type .
424- * @param fileName the path to a video file to transcribe
423+ * the selected model .
424+ * @param fileName the path to a audio file to transcribe
425425 */
426- public static void transcribeVideoFile (String fileName ) throws Exception {
426+ public static void transcribeModelSelection (String fileName ) throws Exception {
427427 Path path = Paths .get (fileName );
428428 byte [] content = Files .readAllBytes (path );
429429
@@ -456,11 +456,11 @@ public static void transcribeVideoFile(String fileName) throws Exception {
456456
457457 // [START speech_transcribe_model_selection_gcs]
458458 /**
459- * Performs transcription on remote video file and prints the transcription.
460- *
461- * @param gcsUri the path to the remote video file to transcribe.
459+ * Performs transcription of the remote audio file asynchronously with
460+ * the selected model.
461+ * @param gcsUri the path to the remote audio file to transcribe.
462462 */
463- public static void transcribeGcsVideoFile (String gcsUri ) throws Exception {
463+ public static void transcribeModelSelectionGcs (String gcsUri ) throws Exception {
464464 try (SpeechClient speech = SpeechClient .create ()) {
465465
466466 // Configure request with video media type
0 commit comments