Skip to content

Commit 64fbff5

Browse files
committed
Additional samples in GA - model-selection
1 parent a0431a4 commit 64fbff5

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

speech/beta/src/test/java/com/example/speech/RecognizeIT.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ public void tearDown() {
6060
System.setOut(null);
6161
}
6262

63-
@Test
64-
public void testModelSelection() throws Exception {
65-
Recognize.transcribeModelSelection(videoFileName);
66-
String got = bout.toString();
67-
assertThat(got).contains("OK Google");
68-
assertThat(got).contains("the weather outside is sunny");
69-
}
70-
71-
@Test
72-
public void testGcsModelSelection() throws Exception {
73-
Recognize.transcribeModelSelectionGcs(gcsVideoPath);
74-
String got = bout.toString();
75-
assertThat(got).contains("OK Google");
76-
assertThat(got).contains("the weather outside is sunny");
77-
}
78-
7963
@Test
8064
public void testMetadata() throws Exception {
8165
Recognize.transcribeFileWithMetadata(recognitionAudioFile);

speech/cloud-client/src/test/java/com/example/speech/RecognizeIT.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ public class RecognizeIT {
3838
// The path to the audio file to transcribe
3939
private String audioFileName = "./resources/audio.raw";
4040
private String gcsAudioPath = "gs://" + BUCKET + "/speech/brooklyn.flac";
41-
4241
private String recognitionAudioFile = "./resources/commercial_mono.wav";
4342

43+
// The path to the video file to transcribe
44+
private String videoFileName = "./resources/Google_Gnome.wav";
45+
private String gcsVideoPath = "gs://" + BUCKET + "/speech/Google_Gnome.wav";
46+
4447
@Before
4548
public void setUp() {
4649
bout = new ByteArrayOutputStream();
@@ -132,4 +135,19 @@ public void testEnhancedModel() throws Exception {
132135
assertThat(got).contains("Chrome");
133136
}
134137

138+
@Test
139+
public void testModelSelection() throws Exception {
140+
Recognize.transcribeModelSelection(videoFileName);
141+
String got = bout.toString();
142+
assertThat(got).contains("OK Google");
143+
assertThat(got).contains("the weather outside is sunny");
144+
}
145+
146+
@Test
147+
public void testGcsModelSelection() throws Exception {
148+
Recognize.transcribeModelSelectionGcs(gcsVideoPath);
149+
String got = bout.toString();
150+
assertThat(got).contains("OK Google");
151+
assertThat(got).contains("the weather outside is sunny");
152+
}
135153
}

0 commit comments

Comments
 (0)