@@ -16,15 +16,6 @@ describe('speech_to_text_integration', function() {
1616 jest . setTimeout ( TWENTY_SECONDS ) ;
1717
1818 const speech_to_text = new SpeechToTextV1 ( auth . speech_to_text ) ;
19- const speech_to_text_rc = new SpeechToTextV1 ( auth . speech_to_text_rc ) ;
20-
21- it ( 'recognize() (RC) @slow' , function ( done ) {
22- const params = {
23- audio : fs . createReadStream ( path . join ( __dirname , '../resources/weather.ogg' ) ) ,
24- content_type : 'audio/ogg; codec=opus' ,
25- } ;
26- speech_to_text_rc . recognize ( params , done ) ;
27- } ) ;
2819
2920 it ( 'recognize()' , function ( done ) {
3021 const params = {
@@ -107,7 +98,7 @@ describe('speech_to_text_integration', function() {
10798 speech_to_text . listModels ( { } , done ) ;
10899 } ) ;
109100
110- describe ( 'recognizeUsingWebSocket() (RC) ( credentials from environment/VCAP) @slow' , ( ) => {
101+ describe ( 'recognizeUsingWebSocket() (credentials from environment/VCAP) @slow' , ( ) => {
111102 let env ;
112103 beforeEach ( function ( ) {
113104 env = process . env ;
@@ -118,8 +109,8 @@ describe('speech_to_text_integration', function() {
118109 } ) ;
119110
120111 it ( 'transcribes audio over a websocket, credentials from environment' , function ( done ) {
121- process . env . SPEECH_TO_TEXT_IAM_APIKEY = auth . speech_to_text_rc . iam_apikey ;
122- process . env . SPEECH_TO_TEXT_URL = auth . speech_to_text_rc . url ;
112+ process . env . SPEECH_TO_TEXT_IAM_APIKEY = auth . speech_to_text . iam_apikey ;
113+ process . env . SPEECH_TO_TEXT_URL = auth . speech_to_text . url ;
123114 const speech_to_text_env = new SpeechToTextV1 ( { } ) ;
124115 const recognizeStream = speech_to_text_env . recognizeUsingWebSocket ( ) ;
125116 recognizeStream . setEncoding ( 'utf8' ) ;
@@ -142,8 +133,8 @@ describe('speech_to_text_integration', function() {
142133 speech_to_text : [
143134 {
144135 credentials : {
145- iam_apikey : auth . speech_to_text_rc . iam_apikey ,
146- url : auth . speech_to_text_rc . url ,
136+ iam_apikey : auth . speech_to_text . iam_apikey ,
137+ url : auth . speech_to_text . url ,
147138 } ,
148139 } ,
149140 ] ,
@@ -166,25 +157,6 @@ describe('speech_to_text_integration', function() {
166157 } ) ;
167158 } ) ;
168159
169- describe ( 'recognizeUsingWebSocket() (RC)' , ( ) => {
170- it ( 'transcribes audio over a websocket @slow' , function ( done ) {
171- const recognizeStream = speech_to_text_rc . recognizeUsingWebSocket ( ) ;
172- recognizeStream . setEncoding ( 'utf8' ) ;
173- fs . createReadStream ( path . join ( __dirname , '../resources/weather.flac' ) )
174- . pipe ( recognizeStream )
175- . on ( 'error' , done )
176- . pipe (
177- concat ( function ( transcription ) {
178- expect ( typeof transcription ) . toBe ( 'string' ) ;
179- expect ( transcription . trim ( ) ) . toBe (
180- 'thunderstorms could produce large hail isolated tornadoes and heavy rain'
181- ) ;
182- done ( ) ;
183- } )
184- ) ;
185- } ) ;
186- } ) ;
187-
188160 describe ( 'recognizeUsingWebSocket()' , ( ) => {
189161 it ( 'transcribes audio over a websocket @slow' , function ( done ) {
190162 const recognizeStream = speech_to_text . recognizeUsingWebSocket ( ) ;
0 commit comments