mingyang91 commited on
Commit
59eba26
·
verified ·
1 Parent(s): 6647d0d

let aws & whisper as same level crates

Browse files
Files changed (4) hide show
  1. .gitignore +2 -0
  2. src/asr/mod.rs +17 -0
  3. whisper/Cargo.toml +32 -0
  4. whisper/src/lib.rs +3 -0
.gitignore CHANGED
@@ -1,3 +1,5 @@
1
  /target
2
  .idea/
3
  models
 
 
 
1
  /target
2
  .idea/
3
  models
4
+ whisper/models
5
+ whisper/samples
src/asr/mod.rs ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ mod aws;
2
+ pub(crate) mod whisper;
3
+
4
+ use async_trait::async_trait;
5
+ use tokio::sync::broadcast::Receiver;
6
+
7
+ #[derive(Debug, Clone)]
8
+ pub(crate) struct Event {
9
+ pub(crate) transcript: String,
10
+ pub(crate) is_final: bool,
11
+ }
12
+
13
+ #[async_trait]
14
+ pub(crate) trait ASR {
15
+ async fn frame(&mut self, frame: &[i16]) -> anyhow::Result<()>;
16
+ fn subscribe(&mut self) -> Receiver<Event>;
17
+ }
whisper/Cargo.toml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [package]
2
+ name = "whisper"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+
6
+ [lib]
7
+ name = "whisper"
8
+ path = "src/lib.rs"
9
+
10
+ [[bin]]
11
+ name = "whisper"
12
+ path = "src/main.rs"
13
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
14
+
15
+ [dependencies]
16
+ once_cell = "1.18"
17
+ fvad = "0.1"
18
+ tokio = { version = "1.34", features = ["macros", "rt-multi-thread", "sync", "signal", "time"] }
19
+ tracing = { version = "0.1", features = [] }
20
+ serde = { version = "1.0", features = ["derive"] }
21
+ lazy_static = { version = "1.4.0", features = [] }
22
+
23
+ [dependencies.whisper-rs]
24
+ git = "https://github.com/mingyang91/whisper-rs.git"
25
+ features = ["coreml", "metal"]
26
+ [dependencies.whisper-rs-sys]
27
+ git = "https://github.com/mingyang91/whisper-rs.git"
28
+ package = "whisper-rs-sys"
29
+
30
+ [dev-dependencies]
31
+ hound = "*"
32
+ tracing-test = "0.2.4"
whisper/src/lib.rs ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ pub mod handler;
2
+ pub mod config;
3
+ pub mod group;