alltalk 0.1.0

A client for the AllTalk API
Documentation
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug)]
pub struct VoicesResponse {
  pub voices: Vec<String>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CurrentSettingsResponse {
  pub engines_available: Vec<String>,
  pub current_engine_loaded: String,
  pub models_available: Vec<ModelsAvailable>,
  pub current_model_loaded: String,
  pub manufacturer_name: String,
  pub audio_format: String,
  pub deepspeed_capable: bool,
  pub deepspeed_available: bool,
  pub deepspeed_enabled: bool,
  pub generationspeed_capable: bool,
  pub generationspeed_set: i64,
  pub lowvram_capable: bool,
  pub lowvram_enabled: bool,
  pub pitch_capable: bool,
  pub pitch_set: i64,
  pub repetitionpenalty_capable: bool,
  pub repetitionpenalty_set: i64,
  pub streaming_capable: bool,
  pub temperature_capable: bool,
  pub temperature_set: f64,
  pub ttsengines_installed: bool,
  pub languages_capable: bool,
  pub multivoice_capable: bool,
  pub multimodel_capable: bool,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ModelsAvailable {
  pub name: String,
}

// this entity modella a status response from the server
// {"status": "deepspeed-success"}
#[derive(Deserialize, Debug)]
pub struct StatusResponse {
  pub status: String,
}

// The TTsGenerationResponse returns a JSON object with the following
// properties:

// status Indicates whether the generation was successful (generate-success) or
// failed (generate-failure). output_file_path The on-disk location of the
// generated WAV file. output_file_url The HTTP location for accessing the
// generated WAV file for browser playback. output_cache_url The HTTP location
// for accessing the generated WAV file as a pushed download. Example JSON TTS
// Generation Response:

// {"status":"generate-success","output_file_path":"C:\\text-generation-webui\\extensions\\alltalk_tts\\outputs\\myoutputfile_1704141936.wav", "output_file_url":"http://127.0.0.1:7851/audio/myoutputfile_1704141936.wav", "output_cache_url":"http://127.0.0.1:7851/audiocache/myoutputfile_1704141936.wav"}
#[derive(Deserialize, Debug)]
pub struct TTSGenerationResponse {
  pub status: String,
  pub output_file_path: String,
  pub output_file_url: String,
  pub output_cache_url: String,
}