Skip to content

Commit 3d348ab

Browse files
committed
watermark the audio directly
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 586bad8 commit 3d348ab

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Service/WatermarkingService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function markAudio(string $audio): string {
123123

124124
return $newAudio;
125125
} catch (\Throwable $e) {
126-
$this->logger->warning('Could not add AI watermark to AI generated image', ['exception' => $e]);
126+
$this->logger->warning('Could not add AI watermark to AI generated audio', ['exception' => $e]);
127127
return $audio;
128128
}
129129
}

lib/TaskProcessing/AudioToAudioTranslateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function process(
255255
$this->logger->warning('Text to speech generation failed: no speech returned');
256256
throw new ProcessingException('Text to speech generation failed: no speech returned');
257257
}
258-
$translatedAudio = $apiResponse['body'];
258+
$translatedAudio = $includeWatermark ? $this->watermarkingService->markAudio($apiResponse['body']) : $apiResponse['body'];
259259
} catch (\Exception $e) {
260260
$this->logger->warning('Text to speech generation failed with: ' . $e->getMessage(), ['exception' => $e]);
261261
throw new ProcessingException(

0 commit comments

Comments
 (0)