mod tts_fetch;
mod tts_list;
mod tts_run;
mod tts_voices;
use bunsen::errors::BunsenResult;
use clap::ArgMatches;
pub use tts_fetch::*;
pub use tts_list::*;
pub use tts_run::*;
pub use tts_voices::*;
#[derive(clap::Args, Debug)]
pub struct TtsCommandGroup {
#[clap(subcommand)]
command: TtsSubCommand,
}
#[derive(clap::Subcommand, Debug)]
pub enum TtsSubCommand {
Run(Box<TtsRunCommand>),
Voices(Box<TtsVoicesCommand>),
List(TtsListCommand),
Fetch(TtsFetchCommand),
}
impl TtsCommandGroup {
pub fn run(
&self,
matches: &ArgMatches,
) -> BunsenResult<()> {
match &self.command {
TtsSubCommand::Run(cmd) => cmd.run(matches),
TtsSubCommand::Voices(cmd) => cmd.run(matches),
TtsSubCommand::List(cmd) => cmd.run(),
TtsSubCommand::Fetch(cmd) => cmd.run(),
}
}
}