eliza_plugin_edge_tts/lib.rs
1//! Edge TTS plugin for elizaOS - Free text-to-speech using Microsoft Edge TTS.
2//!
3//! This crate provides text-to-speech (TTS) capabilities using Microsoft Edge's
4//! TTS service. No API key required - uses the same TTS engine as Microsoft Edge browser.
5//!
6//! # Features
7//!
8//! - High-quality neural voices
9//! - Multiple languages and locales
10//! - Adjustable rate, pitch, and volume
11//! - No API key or payment required
12//! - Voice presets compatible with OpenAI voice names
13//!
14//! # Example
15//!
16//! ```no_run
17//! use eliza_plugin_edge_tts::EdgeTTSService;
18//!
19//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
20//! let service = EdgeTTSService::new();
21//! let audio = service.text_to_speech("Hello, world!").await?;
22//! println!("Generated {} bytes of audio", audio.len());
23//! # Ok(())
24//! # }
25//! ```
26
27#![warn(missing_docs)]
28#![warn(clippy::all)]
29
30pub mod plugin;
31pub mod services;
32pub mod types;
33
34pub use plugin::EdgeTTSPlugin;
35pub use services::EdgeTTSService;
36pub use types::{
37 EdgeTTSError, EdgeTTSParams, EdgeTTSSettings, DEFAULT_LANG, DEFAULT_OUTPUT_FORMAT,
38 DEFAULT_TIMEOUT_MS, DEFAULT_VOICE, MAX_TEXT_LENGTH, POPULAR_VOICES, SUPPORTED_OUTPUT_FORMATS,
39 VOICE_PRESETS,
40};
41
42/// Crate version
43pub const VERSION: &str = env!("CARGO_PKG_VERSION");