2022-03-07 19:08:12 +00:00
|
|
|
pub(crate) const SERVER_NAME_TTS: &str = "_Text to speech front end_";
|
|
|
|
|
|
|
|
|
|
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Debug)]
|
|
|
|
|
pub(crate) enum Opcode {
|
2022-03-10 10:05:33 +00:00
|
|
|
/// Basic, interruptable conversion of a string to audible speech
|
2022-03-07 19:08:12 +00:00
|
|
|
TextToSpeech,
|
2022-03-10 10:05:33 +00:00
|
|
|
/// Non-interruptable conversion of a string to audible speech. Blocks until the phrase is finished.
|
|
|
|
|
TextToSpeechBlocking,
|
2022-03-07 20:41:45 +00:00
|
|
|
/// Stops audio playback immediately. Does not stop wave generation.
|
|
|
|
|
CodecStop,
|
2022-03-08 19:48:12 +00:00
|
|
|
/// Set words per minute
|
|
|
|
|
SetWordsPerMinute,
|
2022-03-07 19:08:12 +00:00
|
|
|
/// Exits the server
|
|
|
|
|
Quit,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)]
|
|
|
|
|
pub struct TtsFrontendMsg {
|
|
|
|
|
pub text: xous_ipc::String::<2048>,
|
|
|
|
|
}
|