Fix TTS audio preview

This commit is contained in:
Cohee
2024-06-17 20:28:19 +03:00
parent be9f34ab8a
commit fe5289c495
4 changed files with 4 additions and 4 deletions

View File

@ -175,7 +175,7 @@ class AzureTtsProvider {
const url = URL.createObjectURL(audio);
this.audioElement.src = url;
this.audioElement.play();
URL.revokeObjectURL(url);
this.audioElement.onended = () => URL.revokeObjectURL(url);
}
async fetchTtsGeneration(text, voiceId) {