Skip to content

Rust Edge TTS. A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API.

License

Notifications You must be signed in to change notification settings

ganlvtech/edge-tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Edge TTS

A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API.

Inspired by https://github.com/rany2/edge-tts and https://github.com/Migushthe2nd/MsEdgeTTS

https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup

Usage

cargo add edge-tts --git https://github.com/ganlvtech/edge-tts.git

or

[dependencies]
edge-tts = { git = "https://github.com/ganlvtech/edge-tts.git", version = "0.1.0" }

Example

cargo run --example hello

use std::fs::OpenOptions;
use std::io::Write;
use edge_tts::{build_ssml, request_audio};

fn main() {
    OpenOptions::new().create(true).truncate(true).write(true).open("test.mp3").unwrap()
        .write(&request_audio(&build_ssml("晚上好,欢迎进入直播间。", "zh-CN-XiaoxiaoNeural", "medium", "medium", "medium"), "audio-24khz-48kbitrate-mono-mp3").unwrap()).unwrap();
}

LICENSE

MIT License

About

Rust Edge TTS. A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages