1212use Exception ;
1313use OCA \OpenAi \AppInfo \Application ;
1414use OCA \OpenAi \Service \OpenAiAPIService ;
15- use OCA \OpenAi \Service \OpenAiSettingsService ;
1615use OCP \Files \File ;
1716use OCP \IAppConfig ;
1817use OCP \IL10N ;
@@ -27,7 +26,6 @@ class AudioToAudioChatProvider implements ISynchronousProvider {
2726
2827 public function __construct (
2928 private OpenAiAPIService $ openAiAPIService ,
30- private OpenAiSettingsService $ openAiSettingsService ,
3129 private IL10N $ l ,
3230 private LoggerInterface $ logger ,
3331 private IAppConfig $ appConfig ,
@@ -125,11 +123,6 @@ public function getOptionalOutputShape(): array {
125123 $ this ->l ->t ('Input transcription ' ),
126124 EShapeType::Text,
127125 ),
128- 'output_transcript ' => new ShapeDescriptor (
129- $ this ->l ->t ('Output transcript ' ),
130- $ this ->l ->t ('Response transcription ' ),
131- EShapeType::Text,
132- ),
133126 ];
134127 }
135128
@@ -249,7 +242,7 @@ public function process(?string $userId, array $input, callable $reportProgress)
249242 'input_transcript ' => $ inputTranscription ,
250243 ];
251244 } catch (\Exception $ e ) {
252- $ this ->logger ->warning ('OpenAI/LocalAI \'s text to image generation failed with: ' . $ e ->getMessage (), ['exception ' => $ e ]);
245+ $ this ->logger ->warning ('OpenAI/LocalAI \'s text to speech generation failed with: ' . $ e ->getMessage (), ['exception ' => $ e ]);
253246 throw new RuntimeException ('OpenAI/LocalAI \'s text to image generation failed with: ' . $ e ->getMessage ());
254247 }
255248 }
0 commit comments