pub trait MusicProvider: Send + Sync {
// Required methods
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MusicRequest,
) -> Pin<Box<dyn Future<Output = Result<AudioFrame, AudioError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn supported_genres(&self) -> &[String];
}Available on crate feature
audio only.Expand description
Unified trait for music generation providers.
Required Methods§
Sourcefn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MusicRequest,
) -> Pin<Box<dyn Future<Output = Result<AudioFrame, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MusicRequest,
) -> Pin<Box<dyn Future<Output = Result<AudioFrame, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Generate music from a text prompt.
Sourcefn supported_genres(&self) -> &[String]
fn supported_genres(&self) -> &[String]
List supported genre strings.