diff --git a/obs-rvc/src/lib.rs b/obs-rvc/src/lib.rs index ef99f24..9d61c5d 100644 --- a/obs-rvc/src/lib.rs +++ b/obs-rvc/src/lib.rs @@ -327,25 +327,25 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_MODEL_PATH, - obs_string!("模型路径"), - PathProp::new(PathType::File).with_filter(obs_string!("ONNX 模型文件 (*.onnx)")), + obs_string!("Model Path"), + PathProp::new(PathType::File).with_filter(obs_string!("ONNX Model File Path (*.onnx)")), ); p.add( SETTING_INDEX_PATH, - obs_string!("RVC 音高索引文件路径"), - PathProp::new(PathType::File).with_filter(obs_string!("Index 文件 (*.index)")), + obs_string!("RVC Pitch Index File Path"), + PathProp::new(PathType::File).with_filter(obs_string!("RVC Pitch Index File Path (*.index)")), ); let mut version_list = - p.add_list::(SETTING_MODEL_VERSION, obs_string!("模型版本"), false); + p.add_list::(SETTING_MODEL_VERSION, obs_string!("Model Version"), false); version_list.push(obs_string!("v1"), RvcModelVersion::V1); version_list.push(obs_string!("v2"), RvcModelVersion::V2); p.add( SETTING_DEST_SAMPLE_RATE, - obs_string!("模型目标采样率"), + obs_string!("Destination Sample Rate"), NumberProp::new_int() .with_range(16000..=48000) .with_step(4000) @@ -353,13 +353,13 @@ impl GetPropertiesSource for RvcInferenceFilter { ); let mut pitch_algorithm_list = - p.add_list::(SETTING_PITCH_ALGORITHM, obs_string!("音高算法"), false); + p.add_list::(SETTING_PITCH_ALGORITHM, obs_string!("Pitch Algorithm"), false); pitch_algorithm_list.push(obs_string!("RMVPE"), PitchAlgorithm::Rmvpe); p.add( SETTING_PITCH_SHIFT, - obs_string!("音调设置"), + obs_string!("Pitch Shift"), NumberProp::new_int() .with_range(-24..=24) .with_step(1) @@ -368,7 +368,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_RESONANCE_SHIFT, - obs_string!("共振偏移"), + obs_string!("Resonance Shift"), NumberProp::new_float(0.07) .with_range(-5.0..=5.0) .with_slider(), @@ -376,7 +376,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_INDEX_RATE, - obs_string!("索引率"), + obs_string!("Index Rate"), NumberProp::new_float(0.01) .with_range(0.00..=1.00) .with_slider(), @@ -384,7 +384,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_LOUDNESS_FACTOR, - obs_string!("响度因子"), + obs_string!("Loudness Factor"), NumberProp::new_float(0.01) .with_range(0.00..=1.00) .with_slider(), @@ -392,7 +392,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_SAMPLE_LENGTH, - obs_string!("采样长度"), + obs_string!("Sample Length"), NumberProp::new_float(0.01) .with_range(0.01..=1.50) .with_slider(), @@ -400,7 +400,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_FADE_LENGTH, - obs_string!("淡入淡出长度"), + obs_string!("Fade In/Out Length"), NumberProp::new_float(0.01) .with_range(0.01..=0.15) .with_slider(), @@ -408,7 +408,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_EXTRA_INFERENCE_TIME, - obs_string!("额外推理时长"), + obs_string!("Extra Inference Time"), NumberProp::new_float(0.01) .with_range(0.00..=5.00) .with_slider(), @@ -416,7 +416,7 @@ impl GetPropertiesSource for RvcInferenceFilter { p.add( SETTING_SKIP_INFERENCE, - obs_string!("跳过推理"), + obs_string!("Skip Inference"), BoolProp ); @@ -784,7 +784,6 @@ fn process_one_frame(input_sample: &[f32], state: &mut RvcInferenceState) -> nda *output_sola_buffer_view = *output_sola_buffer_view * fade_in + sola * fade_out; }); - // self.sola_buffer.assign(&output[self.sample_frame_size..(self.sample_frame_size + self.sola_buffer_frame_size)]); state.sola_buffer.assign(&output.slice(s![ state.sample_frame_size..(state.sample_frame_size + state.sola_buffer_frame_size) @@ -920,11 +919,9 @@ impl Drop for RvcInferenceFilter { impl Module for RvcInferenceModule { fn new(context: ModuleRef) -> Self { - let binary_path = PathBuf::from(context.binary_path().unwrap().as_str()); let data_path = PathBuf::from(context.data_path().unwrap().as_str()); - unsafe { BINARY_PATH = Some(binary_path); DATA_PATH = Some(data_path); @@ -964,4 +961,4 @@ impl Module for RvcInferenceModule { } } -obs_register_module!(RvcInferenceModule); +obs_register_module!(RvcInferenceModule); \ No newline at end of file