mirror of
https://github.com/OpenBMB/VoxCPM
synced 2025-12-12 03:48:12 +00:00
fix: streaming mode
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
launch.json
|
launch.json
|
||||||
__pycache__
|
__pycache__
|
||||||
voxcpm.egg-info
|
voxcpm.egg-info
|
||||||
|
.DS_Store
|
||||||
@@ -105,7 +105,8 @@ class VoxCPM:
|
|||||||
prompt_text : str = None,
|
prompt_text : str = None,
|
||||||
cfg_value : float = 2.0,
|
cfg_value : float = 2.0,
|
||||||
inference_timesteps : int = 10,
|
inference_timesteps : int = 10,
|
||||||
max_length : int = 4096,
|
min_len : int = 2,
|
||||||
|
max_len : int = 4096,
|
||||||
normalize : bool = True,
|
normalize : bool = True,
|
||||||
denoise : bool = True,
|
denoise : bool = True,
|
||||||
retry_badcase : bool = True,
|
retry_badcase : bool = True,
|
||||||
@@ -127,7 +128,7 @@ class VoxCPM:
|
|||||||
prompt_text: Text content corresponding to the prompt audio.
|
prompt_text: Text content corresponding to the prompt audio.
|
||||||
cfg_value: Guidance scale for the generation model.
|
cfg_value: Guidance scale for the generation model.
|
||||||
inference_timesteps: Number of inference steps.
|
inference_timesteps: Number of inference steps.
|
||||||
max_length: Maximum token length during generation.
|
max_len: Maximum token length during generation.
|
||||||
normalize: Whether to run text normalization before generation.
|
normalize: Whether to run text normalization before generation.
|
||||||
denoise: Whether to denoise the prompt audio if a denoiser is
|
denoise: Whether to denoise the prompt audio if a denoiser is
|
||||||
available.
|
available.
|
||||||
@@ -177,8 +178,8 @@ class VoxCPM:
|
|||||||
generate_result = self.tts_model._generate_with_prompt_cache(
|
generate_result = self.tts_model._generate_with_prompt_cache(
|
||||||
target_text=text,
|
target_text=text,
|
||||||
prompt_cache=fixed_prompt_cache,
|
prompt_cache=fixed_prompt_cache,
|
||||||
min_len=2,
|
min_len=min_len,
|
||||||
max_len=max_length,
|
max_len=max_len,
|
||||||
inference_timesteps=inference_timesteps,
|
inference_timesteps=inference_timesteps,
|
||||||
cfg_value=cfg_value,
|
cfg_value=cfg_value,
|
||||||
retry_badcase=retry_badcase,
|
retry_badcase=retry_badcase,
|
||||||
|
|||||||
Reference in New Issue
Block a user