rust_ai/azure/apis/
mod.rs

1//! 
2//! Azure APIs in Rust like structs.
3//! 
4//! This is not just a simple wrapping binding of Azure's services, you can 
5//! chain parameters/modifiers with sequential method calls.
6//! 
7//! # Example 
8//! 
9//! ```rust, ignore
10//! use rust_ai::azure::{ssml::Speak, Locale, Speech, VoiceName, SSML};
11//! 
12//! #[tokio::main]
13//! async fn main() -> tokio::io::Result<()> {
14//!   let ssml = SSML::from(
15//!     Speak::voice_content(
16//!       VoiceName::zh_CN_YunhaoNeural,
17//!       "亲爱的朋友,美丽中国欢迎你!",
18//!     )
19//!     .lang(Locale::zh_CN),
20//!   );
21//!   
22//!   let result = Speech::from(ssml).tts().await.unwrap();
23//!   
24//!   std::fs::write(std::path::PathBuf::from(r"D:\Contents\Downloads\output.mp3"), result).unwrap();
25//!   Ok(())
26//! }
27//! ```
28
29////////////////////////////////////////////////////////////////////////////////
30
31/// Speech capabilities from Azure Cognitive service
32pub mod speech;