File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
models/spring-ai-openai/src/test/java/org/springframework/ai/openai/audio/api Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,14 @@ void speechTranscriptionAndTranslation() throws IOException {
59
59
TranslationRequest .builder ().withModel (WhisperModel .WHISPER_1 .getValue ()).withFile (speech ).build (),
60
60
StructuredResponse .class );
61
61
62
- assertThat (translation .text ()) .isEqualTo ("Hello, my name is Chris, and I love Spring AI." );
62
+ assertThat (translation .text (). replaceAll ( "," , "" )) .isEqualTo ("Hello my name is Chris and I love Spring AI." );
63
63
64
64
StructuredResponse transcriptionEnglish = audioApi .createTranscription (
65
65
TranscriptionRequest .builder ().withModel (WhisperModel .WHISPER_1 .getValue ()).withFile (speech ).build (),
66
66
StructuredResponse .class );
67
67
68
- assertThat (transcriptionEnglish .text ()).isEqualTo ("Hello, my name is Chris, and I love Spring AI." );
68
+ assertThat (transcriptionEnglish .text ().replaceAll ("," , "" ))
69
+ .isEqualTo ("Hello my name is Chris and I love Spring AI." );
69
70
70
71
StructuredResponse transcriptionDutch = audioApi .createTranscription (
71
72
TranscriptionRequest .builder ().withFile (speech ).withLanguage ("nl" ).build (), StructuredResponse .class );
You can’t perform that action at this time.
0 commit comments