Skip to main content

MusicProvider

Trait MusicProvider 

Source
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§

Source

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.

Source

fn supported_genres(&self) -> &[String]

List supported genre strings.

Implementors§