mirror of
https://github.com/mii443/rust.git
synced 2025-08-22 16:25:37 +00:00
oh
This commit is contained in:
@ -16,7 +16,7 @@ impl AudioQuery {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ impl Client {
|
||||
|
||||
pub async fn create_audio_query(
|
||||
&self,
|
||||
text: &str,
|
||||
text: &str, speaker: i32,
|
||||
core_version: Option<&str>,
|
||||
) -> 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);
|
||||
Ok(audio_query)
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ impl RestAPI {
|
||||
}
|
||||
|
||||
pub async fn create_audio_query(
|
||||
&self, speaker: i32,
|
||||
text: &str,
|
||||
&self,
|
||||
text: &str, speaker: &str,
|
||||
core_version: Option<&str>,
|
||||
) -> Result<AudioQueryType> {
|
||||
let mut params = vec![("text", text), ("speaker", speaker)];
|
||||
|
Reference in New Issue
Block a user