pub enum AddPromptError {
ConnectionError(String),
BadRequest400,
ServiceUnavailable503,
InternalServerError500,
FileReadError(String),
UnsupportedMediaType415,
Unauthorised401(String),
}
Available on crate feature
tts
only.Variants§
ConnectionError(String)
There was an error establishing the connection
BadRequest400
The request failed: Possible failure causes include:
- The prompt name exceeds the 49-character limit or includes characters that are not alphanumeric or underscores
- The audio has a media type other than audio/wav or a sampling rate of less than 16 kHz
- The audio is longer than 30 seconds
- The service cannot process the audio for any reason (for example, the audio is corrupt)
- The service cannot align the text and the audio because differences between the two are too great
- The request attempts to add a prompt to a custom model that is defined for a language other than US English
- Invalid service credentials were passed with the request
The service is currently unavailable
InternalServerError500
The service experienced an internal error
FileReadError(String)
There was an error reading the file
UnsupportedMediaType415
The request passed an unacceptable media type with the Content-Type header. The header must pass a value of multipart/form-data
The specified customisation_id is invalid for the requesting credentials
Trait Implementations§
Source§impl Debug for AddPromptError
impl Debug for AddPromptError
Source§impl Display for AddPromptError
impl Display for AddPromptError
Source§impl Error for AddPromptError
impl Error for AddPromptError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AddPromptError
impl RefUnwindSafe for AddPromptError
impl Send for AddPromptError
impl Sync for AddPromptError
impl Unpin for AddPromptError
impl UnwindSafe for AddPromptError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more