@@ -212,7 +212,7 @@ public void testGetModelNoOptions() throws Throwable {
212212 public void testRecognizeWOptions () throws Throwable {
213213 // Register a mock response
214214 String mockResponseBody =
215- "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}" ;
215+ "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}" ;
216216 String recognizePath = "/v1/recognize" ;
217217 server .enqueue (
218218 new MockResponse ()
@@ -424,7 +424,7 @@ public void testUnregisterCallbackNoOptions() throws Throwable {
424424 public void testCreateJobWOptions () throws Throwable {
425425 // Register a mock response
426426 String mockResponseBody =
427- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
427+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
428428 String createJobPath = "/v1/recognitions" ;
429429 server .enqueue (
430430 new MockResponse ()
@@ -542,7 +542,7 @@ public void testCreateJobNoOptions() throws Throwable {
542542 public void testCheckJobsWOptions () throws Throwable {
543543 // Register a mock response
544544 String mockResponseBody =
545- "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}]}" ;
545+ "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}]}" ;
546546 String checkJobsPath = "/v1/recognitions" ;
547547 server .enqueue (
548548 new MockResponse ()
@@ -587,8 +587,7 @@ public void testCheckJobsWRetries() throws Throwable {
587587 public void testCheckJobWOptions () throws Throwable {
588588 // Register a mock response
589589 String mockResponseBody =
590- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
591- String checkJobPath = "/v1/recognitions/testString" ;
590+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ; String checkJobPath = "/v1/recognitions/testString" ;
592591 server .enqueue (
593592 new MockResponse ()
594593 .setHeader ("Content-type" , "application/json" )
0 commit comments