convert audio wav to mp3 (#552)

This commit is contained in:
zxhlyh 2023-07-12 17:18:56 +08:00 • committed by GitHub
commit 397a92f2ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 64 additions and 27 deletions

View file

@ -1,23 +1,13 @@
from services.errors.base import BaseServiceError
class NoAudioUploadedServiceError(BaseServiceError):
error_code = 'no_audio_uploaded'
description = "Please upload your audio."
code = 400
class NoAudioUploadedServiceError(Exception):
pass
class AudioTooLargeServiceError(BaseServiceError):
error_code = 'audio_too_large'
description = "Audio size exceeded. {message}"
code = 413
class AudioTooLargeServiceError(Exception):
pass
class UnsupportedAudioTypeServiceError(BaseServiceError):
error_code = 'unsupported_audio_type'
description = "Audio type not allowed."
code = 415
class UnsupportedAudioTypeServiceError(Exception):
pass
class ProviderNotSupportSpeechToTextServiceError(BaseServiceError):
error_code = 'provider_not_support_speech_to_text'
description = "Provider not support speech to text. {message}"
code = 400
class ProviderNotSupportSpeechToTextServiceError(Exception):
pass