@@ -180,63 +180,6 @@ describe('speech_to_text', function() {
180180 } ) ;
181181 } ) ;
182182
183- // this test is severely broken
184- /* describe.skip('recognizeStream()', function() {
185- const service_response = {
186- result: [
187- {
188- alternative: [
189- {
190- transcript: 'one two three',
191- },
192- ],
193- final: true,
194- },
195- ],
196- result_index: 0,
197- };
198-
199- const options = {
200- content_type: 'audio/l16;rate=41100',
201- continuous: true,
202- timestamps: true,
203- inactivity_timeout: -1,
204- max_alternatives: 1,
205- interim_results: false,
206- keywords: ['one', 'Three'],
207- keywords_threshold: 0.9,
208- word_alternatives_threshold: 0.25,
209- };
210- const recognizeStream = speech_to_text.createRecognizeStream(options);
211- fs.createReadStream(__dirname + '/../resources/weather.wav').pipe(recognizeStream);
212- recognizeStream.setEncoding('utf8');
213-
214- // note: none of these tests actually run(or even register with mocha), but the callbacks let the previous test pass :(
215- recognizeStream.on('open', function(socket) {
216- it('should have a socket connection with a correct config', function(done) {
217- assert.notStrictEqual(socket, socket.config, socket.config.fragmentOutgoingMessages);
218- assert.notStrictEqual(socket, socket.config, socket.config.fragmentOutgoingMessages);
219- done();
220- });
221- });
222-
223- recognizeStream.on('error', function(err) {
224- it('should throw ECONNRESET with bad credentials', function(done) {
225- assert.equal(err.code, 'ECONNRESET');
226- assert.equal(err.errno, 'ECONNRESET');
227- done();
228- });
229- });
230-
231- recognizeStream.on('data', function(obj) {
232- console.log(JSON.stringify(obj)); // eslint-disable-line no-console
233- it('should generate a valid response', function(done) {
234- assert.equal(obj, service_response);
235- done();
236- });
237- });
238- });*/
239-
240183 describe ( 'recognizeLive()' , function ( ) {
241184 const path = '/v1/sessions/foo/recognize' ;
242185 const payload = {
0 commit comments