Skip to content

Commit

Permalink
v1.0.0: stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
GiviMAD committed Jun 17, 2022
1 parent a6df3af commit d4cf071
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "rustpotter-cli"
version = "0.16.0"
version = "1.0.0"
edition = "2021"
license = "Apache-2.0"
description = "CLI for Rustpotter, an open source wake word spotter forged in rust"
description = "CLI for Rustpotter, an open source wake word spotter forged in rust."
authors = ["Miguel Álvarez Díez <[email protected]>"]
repository = "https://github.com/GiviMAD/rustpotter"

[dependencies]
rustpotter = { version = "0.16.0", features = ["log", "vad"] }
rustpotter = { version = "1.0.0", features = ["log", "vad"] }
log = "0.4.6"
pv_recorder = "1.0.2"
ctrlc = "3.2.2"
Expand Down
5 changes: 3 additions & 2 deletions src/cli/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::pv_recorder_utils::_get_pv_recorder_lib;
use rustpotter::{WakewordDetectorBuilder};

#[derive(Args, Debug)]
/// Record wav audio sample with spec 16000hz 16bit 1 channel int
/// Record wav audio with spec 16000hz 16bit 1 channel int. Press "Ctrl + c" to stop and save.
#[clap()]
pub struct RecordCommand {
#[clap()]
Expand Down Expand Up @@ -40,6 +40,7 @@ pub fn record(command: RecordCommand) -> Result<(), String> {
.expect("Unable to setup signal handler");
println!("Start recording...");
recorder.start().expect("Failed to start audio recording");
println!("Press 'Ctrl + c' to stop.");
LISTENING.store(true, Ordering::SeqCst);
let mut audio_data = Vec::new();
let mut frame_buffer = vec![0; recorder.frame_length()];
Expand All @@ -52,7 +53,7 @@ pub fn record(command: RecordCommand) -> Result<(), String> {

println!("Stop recording...");
recorder.stop().expect("Failed to stop audio recording");
println!("Creating wav sample {}", command.output_path);
println!("Creating wav file {}", command.output_path);
let spec = hound::WavSpec {
channels: 1,
sample_rate: 16000,
Expand Down
4 changes: 2 additions & 2 deletions src/cli/spot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct SpotCommand {
/// to reduce computation on absence of voice sound.
noise_mode: Option<String>,
#[clap(long, default_value_t = 0.5)]
/// Voice/silence ratio in the last second to consider voice detected
/// Voice/silence ratio in the last second to consider voice is detected
noise_sensitivity: f32,
/// Enables using a noise detector to reduce computation on absence of voice sound
#[clap(short = 'v', long, possible_values = ["low-bitrate", "quality", "aggressive", "very-aggressive"])]
Expand All @@ -42,7 +42,7 @@ pub struct SpotCommand {
/// Seconds to disable the vad detector after voice is detected
vad_delay: u16,
#[clap(long, default_value_t = 0.5)]
/// Voice/silence ratio in the last second to consider voice detected
/// Voice/silence ratio in the last second to consider voice is detected
vad_sensitivity: f32,
#[clap(long)]
/// Enables rustpotter debug log
Expand Down

0 comments on commit d4cf071

Please sign in to comment.