Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjust AudioToAudioChatTaskType
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Jul 10, 2025
commit 6334caed279ebb3e8767c364283ee52198c4eeec
9 changes: 1 addition & 8 deletions lib/TaskProcessing/AudioToAudioChatProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Exception;
use OCA\OpenAi\AppInfo\Application;
use OCA\OpenAi\Service\OpenAiAPIService;
use OCA\OpenAi\Service\OpenAiSettingsService;
use OCP\Files\File;
use OCP\IAppConfig;
use OCP\IL10N;
Expand All @@ -27,7 +26,6 @@ class AudioToAudioChatProvider implements ISynchronousProvider {

public function __construct(
private OpenAiAPIService $openAiAPIService,
private OpenAiSettingsService $openAiSettingsService,
private IL10N $l,
private LoggerInterface $logger,
private IAppConfig $appConfig,
Expand Down Expand Up @@ -125,11 +123,6 @@ public function getOptionalOutputShape(): array {
$this->l->t('Input transcription'),
EShapeType::Text,
),
'output_transcript' => new ShapeDescriptor(
$this->l->t('Output transcript'),
$this->l->t('Response transcription'),
EShapeType::Text,
),
];
}

Expand Down Expand Up @@ -249,7 +242,7 @@ public function process(?string $userId, array $input, callable $reportProgress)
'input_transcript' => $inputTranscription,
];
} catch (\Exception $e) {
$this->logger->warning('OpenAI/LocalAI\'s text to image generation failed with: ' . $e->getMessage(), ['exception' => $e]);
$this->logger->warning('OpenAI/LocalAI\'s text to speech generation failed with: ' . $e->getMessage(), ['exception' => $e]);
throw new RuntimeException('OpenAI/LocalAI\'s text to image generation failed with: ' . $e->getMessage());
}
}
Expand Down
5 changes: 5 additions & 0 deletions lib/TaskProcessing/AudioToAudioChatTaskType.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public function getOutputShape(): array {
$this->l->t('The generated response as part of the conversation'),
EShapeType::Audio
),
'output_transcript' => new ShapeDescriptor(
$this->l->t('Output transcript'),
$this->l->t('Response transcription'),
EShapeType::Text,
),
];
}
}