1mod error;
7pub use error::{Error, Result};
8
9#[cfg(feature = "stt")]
11pub use rs_voice_toolkit_stt as stt;
12
13#[cfg(feature = "audio")]
14pub use rs_voice_toolkit_audio as audio;
15
16#[cfg(feature = "tts")]
17pub use rs_voice_toolkit_tts as tts;
18
19#[cfg(feature = "stt")]
21pub use rs_voice_toolkit_stt::transcribe_file;
22
23#[cfg(all(feature = "stt", feature = "streaming"))]
24pub use rs_voice_toolkit_stt::streaming::StreamingTranscriber;
25
26#[cfg(feature = "stt")]
28mod stt_wrappers {
29 use super::*;
30
31 pub async fn transcribe_file_unified<P1, P2>(
33 model_path: P1,
34 audio_path: P2,
35 ) -> Result<crate::stt::TranscriptionResult>
36 where
37 P1: Into<std::path::PathBuf>,
38 P2: AsRef<std::path::Path>,
39 {
40 crate::stt::transcribe_file(model_path, audio_path)
41 .await
42 .map_err(Error::from)
43 }
44}
45
46#[cfg(feature = "stt")]
48pub use stt_wrappers::transcribe_file_unified;