Initial commit

master
Tait Hoyem 6 months ago
commit e19b1daf78

1
.gitignore vendored

@ -0,0 +1 @@
/target

1075
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,10 @@
[package]
name = "fry_cli"
version = "0.0.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
fry = "0.0.2"
rodio = "0.17.3"

@ -0,0 +1,18 @@
use rodio::{OutputStream, Sink};
use rodio::buffer::SamplesBuffer;
use fry::tts;
fn main() {
let (_stream, stream_handle) = OutputStream::try_default().unwrap();
let mut buf: [i16; 665920] = [0; 665920];
tts("tait", &mut buf);
let sink = Sink::try_new(&stream_handle).unwrap();
// Add a dummy source of the sake of the example.
let source = SamplesBuffer::new(1, 22050, buf);
sink.append(source);
// The sound plays in a separate thread. This call will block the current thread until the sink
// has finished playing all its queued sounds.
sink.sleep_until_end();
}
Loading…
Cancel
Save