From 9c79cc9a5129b29609596138449c71efdfa8c402 Mon Sep 17 00:00:00 2001 From: Andrey Tkachenko Date: Mon, 20 Mar 2023 15:11:55 +0400 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ Cargo.toml | 24 +++++++++++++++++++ crates/voss-alsa/Cargo.toml | 8 +++++++ crates/voss-alsa/src/lib.rs | 14 ++++++++++++ crates/voss-bss/Cargo.toml | 8 +++++++ crates/voss-bss/src/lib.rs | 14 ++++++++++++ crates/voss-core/Cargo.toml | 8 +++++++ crates/voss-core/src/frame.rs | 43 +++++++++++++++++++++++++++++++++++ crates/voss-core/src/lib.rs | 1 + crates/voss-doa/Cargo.toml | 8 +++++++ crates/voss-doa/src/lib.rs | 14 ++++++++++++ crates/voss-ecc/Cargo.toml | 8 +++++++ crates/voss-ecc/src/lib.rs | 14 ++++++++++++ crates/voss-fst/Cargo.toml | 8 +++++++ crates/voss-fst/src/lib.rs | 14 ++++++++++++ crates/voss-nlml/Cargo.toml | 8 +++++++ crates/voss-nlml/src/lib.rs | 14 ++++++++++++ crates/voss-stt/Cargo.toml | 8 +++++++ crates/voss-stt/src/lib.rs | 14 ++++++++++++ crates/voss-tts/Cargo.toml | 8 +++++++ crates/voss-tts/src/lib.rs | 14 ++++++++++++ crates/voss-vad/Cargo.toml | 8 +++++++ crates/voss-vad/src/lib.rs | 14 ++++++++++++ src/lib.rs | 14 ++++++++++++ 24 files changed, 290 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 crates/voss-alsa/Cargo.toml create mode 100644 crates/voss-alsa/src/lib.rs create mode 100644 crates/voss-bss/Cargo.toml create mode 100644 crates/voss-bss/src/lib.rs create mode 100644 crates/voss-core/Cargo.toml create mode 100644 crates/voss-core/src/frame.rs create mode 100644 crates/voss-core/src/lib.rs create mode 100644 crates/voss-doa/Cargo.toml create mode 100644 crates/voss-doa/src/lib.rs create mode 100644 crates/voss-ecc/Cargo.toml create mode 100644 crates/voss-ecc/src/lib.rs create mode 100644 crates/voss-fst/Cargo.toml create mode 100644 crates/voss-fst/src/lib.rs create mode 100644 crates/voss-nlml/Cargo.toml create mode 100644 crates/voss-nlml/src/lib.rs create mode 100644 crates/voss-stt/Cargo.toml create mode 100644 crates/voss-stt/src/lib.rs create mode 100644 crates/voss-tts/Cargo.toml create mode 100644 crates/voss-tts/src/lib.rs create mode 100644 crates/voss-vad/Cargo.toml create mode 100644 crates/voss-vad/src/lib.rs create mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..07c6e77 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "voss" +version = "0.1.0" +description = "Voice personal assistant" +keywords = ["voice", "assistant", "vosk", "rhvoice"] +author = "Andrey Tkachenko " +license = "MIT OR Apache-2.0" +edition = "2021" + +[workspace] +members = [ + "crates/voss-core", + "crates/voss-alsa", + "crates/voss-ecc", + "crates/voss-vad", + "crates/voss-doa", + "crates/voss-bss", + "crates/voss-stt", + "crates/voss-fst", + "crates/voss-nlml", + "crates/voss-tts", +] + + diff --git a/crates/voss-alsa/Cargo.toml b/crates/voss-alsa/Cargo.toml new file mode 100644 index 0000000..904ab96 --- /dev/null +++ b/crates/voss-alsa/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-alsa" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-alsa/src/lib.rs b/crates/voss-alsa/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-alsa/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-bss/Cargo.toml b/crates/voss-bss/Cargo.toml new file mode 100644 index 0000000..413215b --- /dev/null +++ b/crates/voss-bss/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-bss" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-bss/src/lib.rs b/crates/voss-bss/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-bss/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-core/Cargo.toml b/crates/voss-core/Cargo.toml new file mode 100644 index 0000000..414f05e --- /dev/null +++ b/crates/voss-core/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-core" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-core/src/frame.rs b/crates/voss-core/src/frame.rs new file mode 100644 index 0000000..f101437 --- /dev/null +++ b/crates/voss-core/src/frame.rs @@ -0,0 +1,43 @@ +pub struct AudioContext { + pub timestamp: u64, +} + +pub struct MicAduioFrame { + pub ctx: AudioContext, + pub array_config: MicArrayConfiguration, + pub samples: Array2, +} + +pub struct BeamAudioFrame { + pub ctx: AudioContext, + pub samples: Array1, + pub doa: Doa, + pub id: i32, +} + +pub struct SpeakerAudioFrame { + pub ctx_from: AudioContext, + pub ctx_to: AudioContext, + pub samples: Array1, + pub speaker: Speaker, + pub doa: Doa, +} + +pub struct TranscribedFrame { + speaker_frame: SpeakerAudioFrame, + transcribtion: Transcribtion, +} + +pub struct Doa { + pub angle: f32, +} + +pub struct Speaker { + pub id: i32, + pub features: Option>, + pub info: Option, +} + +pub struct IdentifiedSpeaker { + pub name: String, +} diff --git a/crates/voss-core/src/lib.rs b/crates/voss-core/src/lib.rs new file mode 100644 index 0000000..3384ad4 --- /dev/null +++ b/crates/voss-core/src/lib.rs @@ -0,0 +1 @@ +mod frame; diff --git a/crates/voss-doa/Cargo.toml b/crates/voss-doa/Cargo.toml new file mode 100644 index 0000000..9b9e73f --- /dev/null +++ b/crates/voss-doa/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-doa" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-doa/src/lib.rs b/crates/voss-doa/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-doa/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-ecc/Cargo.toml b/crates/voss-ecc/Cargo.toml new file mode 100644 index 0000000..cdd23af --- /dev/null +++ b/crates/voss-ecc/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-ecc" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-ecc/src/lib.rs b/crates/voss-ecc/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-ecc/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-fst/Cargo.toml b/crates/voss-fst/Cargo.toml new file mode 100644 index 0000000..31d94f6 --- /dev/null +++ b/crates/voss-fst/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-fst" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-fst/src/lib.rs b/crates/voss-fst/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-fst/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-nlml/Cargo.toml b/crates/voss-nlml/Cargo.toml new file mode 100644 index 0000000..c94b850 --- /dev/null +++ b/crates/voss-nlml/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-nlml" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-nlml/src/lib.rs b/crates/voss-nlml/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-nlml/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-stt/Cargo.toml b/crates/voss-stt/Cargo.toml new file mode 100644 index 0000000..4e7bc49 --- /dev/null +++ b/crates/voss-stt/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-stt" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-stt/src/lib.rs b/crates/voss-stt/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-stt/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-tts/Cargo.toml b/crates/voss-tts/Cargo.toml new file mode 100644 index 0000000..83fd464 --- /dev/null +++ b/crates/voss-tts/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-tts" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-tts/src/lib.rs b/crates/voss-tts/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-tts/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/voss-vad/Cargo.toml b/crates/voss-vad/Cargo.toml new file mode 100644 index 0000000..9284cda --- /dev/null +++ b/crates/voss-vad/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "voss-vad" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/voss-vad/src/lib.rs b/crates/voss-vad/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/voss-vad/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}