mirror of
https://github.com/mii443/rust.git
synced 2025-08-23 00:35:34 +00:00
oh
This commit is contained in:
@ -16,7 +16,7 @@ impl AudioQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn synthesis(&self, speaker: i32) -> Result<Bytes> {
|
pub async fn synthesis(&self, speaker: i32) -> Result<Bytes> {
|
||||||
let data = self.restapi.synthesis(&self.audio_query, speaker).await?;
|
let data = self.restapi.synthesis(&self.audio_query, speaker.to_string().as_str()).await?;
|
||||||
Ok(data)
|
Ok(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,10 @@ impl Client {
|
|||||||
|
|
||||||
pub async fn create_audio_query(
|
pub async fn create_audio_query(
|
||||||
&self,
|
&self,
|
||||||
text: &str,
|
text: &str, speaker: i32,
|
||||||
core_version: Option<&str>,
|
core_version: Option<&str>,
|
||||||
) -> Result<AudioQuery> {
|
) -> Result<AudioQuery> {
|
||||||
let data: AudioQueryType = self.restapi.create_audio_query(text, core_version).await?;
|
let data: AudioQueryType = self.restapi.create_audio_query(text, speaker, core_version).await?;
|
||||||
let audio_query = AudioQuery::new(self.restapi.clone(), data);
|
let audio_query = AudioQuery::new(self.restapi.clone(), data);
|
||||||
Ok(audio_query)
|
Ok(audio_query)
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@ impl RestAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn create_audio_query(
|
pub async fn create_audio_query(
|
||||||
&self, speaker: i32,
|
&self,
|
||||||
text: &str,
|
text: &str, speaker: &str,
|
||||||
core_version: Option<&str>,
|
core_version: Option<&str>,
|
||||||
) -> Result<AudioQueryType> {
|
) -> Result<AudioQueryType> {
|
||||||
let mut params = vec![("text", text), ("speaker", speaker)];
|
let mut params = vec![("text", text), ("speaker", speaker)];
|
||||||
|
Reference in New Issue
Block a user