Skip to content

Commit c738ca8

Browse files
committed
fix typo
1 parent af4ef7f commit c738ca8

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/ai/vad.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl VadRealtimeRx {
102102
}
103103
}
104104

105-
pub type VadParams = crate::config::SileroVadconfig;
105+
pub type VadParams = crate::config::SileroVadConfig;
106106

107107
#[derive(Clone)]
108108
pub struct SileroVADFactory {

src/config.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,20 +243,20 @@ pub enum TTSConfig {
243243
}
244244

245245
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
246-
pub struct SileroVadconfig {
247-
#[serde(default = "SileroVadconfig::default_threshold")]
246+
pub struct SileroVadConfig {
247+
#[serde(default = "SileroVadConfig::default_threshold")]
248248
pub threshold: f32,
249-
#[serde(default = "SileroVadconfig::default_neg_threshold")]
249+
#[serde(default = "SileroVadConfig::default_neg_threshold")]
250250
pub neg_threshold: Option<f32>,
251-
#[serde(default = "SileroVadconfig::default_min_speech_duration_ms")]
251+
#[serde(default = "SileroVadConfig::default_min_speech_duration_ms")]
252252
pub min_speech_duration_ms: usize,
253-
#[serde(default = "SileroVadconfig::default_max_silence_duration_ms")]
253+
#[serde(default = "SileroVadConfig::default_max_silence_duration_ms")]
254254
pub max_silence_duration_ms: usize,
255-
#[serde(default = "SileroVadconfig::hangover_ms")]
255+
#[serde(default = "SileroVadConfig::hangover_ms")]
256256
pub hangover_ms: usize,
257257
}
258258

259-
impl SileroVadconfig {
259+
impl SileroVadConfig {
260260
pub fn default_threshold() -> f32 {
261261
0.5
262262
}
@@ -278,9 +278,9 @@ impl SileroVadconfig {
278278
}
279279
}
280280

281-
impl Default for SileroVadconfig {
281+
impl Default for SileroVadConfig {
282282
fn default() -> Self {
283-
SileroVadconfig {
283+
SileroVadConfig {
284284
threshold: Self::default_threshold(),
285285
neg_threshold: Self::default_neg_threshold(),
286286
min_speech_duration_ms: Self::default_min_speech_duration_ms(),
@@ -303,7 +303,7 @@ pub struct WhisperASRConfig {
303303
pub prompt: String,
304304

305305
#[serde(default)]
306-
pub vad: SileroVadconfig,
306+
pub vad: SileroVadConfig,
307307

308308
#[deprecated]
309309
#[serde(default)]

src/services/ws.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async fn process_socket_io(
192192
.map_err(|_| anyhow::anyhow!("audio_tx closed"))?;
193193

194194
if DEBUG_WAV {
195-
if debug_wav_data.len() > 0 {
195+
if !debug_wav_data.is_empty() {
196196
let wav_data = crate::util::pcm_to_wav(
197197
&debug_wav_data,
198198
WavConfig {

src/services/ws/stable/asr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ impl ParaformerASRSession {
446446
recv_audio_bytes += data.len();
447447
if !recv_any_asr_result && recv_audio_bytes >= 16000 * 10 {
448448
log::warn!(
449-
"`{}` paraformer asr received more than 30s audio without StartChat, starting automatically",
449+
"`{}` paraformer asr received more than 10s audio without StartChat, starting automatically",
450450
session.id
451451
);
452452
break;

0 commit comments

Comments
 (0)