mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00

Due to the orphan rule, this meant removing our usages of impl ProtoStruct, or converting them to a trait when they were used commonly. rslib now directly references anki_proto and anki_i18n, instead of 'pub use'-ing them, and we can put the generated files back in OUT_DIR.
21 lines
565 B
Rust
21 lines
565 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use anki_proto::card_rendering::all_tts_voices_response::TtsVoice;
|
|
|
|
use crate::prelude::*;
|
|
|
|
#[cfg(windows)]
|
|
#[path = "windows.rs"]
|
|
mod inner;
|
|
#[cfg(not(windows))]
|
|
#[path = "other.rs"]
|
|
mod inner;
|
|
|
|
pub fn all_voices(validate: bool) -> Result<Vec<TtsVoice>> {
|
|
inner::all_voices(validate)
|
|
}
|
|
|
|
pub fn write_stream(path: &str, voice_id: &str, speed: f32, text: &str) -> Result<()> {
|
|
inner::write_stream(path, voice_id, speed, text)
|
|
}
|