audio_max_len to 30 -> 20, ffmpeg timeout 5 -> 20
This commit is contained in:
parent
e42523af84
commit
820f92d8cb
3 changed files with 5 additions and 3 deletions
|
|
@ -49,7 +49,7 @@ class TranscriptionEngine:
|
||||||
"frame_threshold": 25,
|
"frame_threshold": 25,
|
||||||
"beams": 1,
|
"beams": 1,
|
||||||
"decoder_type": None,
|
"decoder_type": None,
|
||||||
"audio_max_len": 30.0,
|
"audio_max_len": 20.0,
|
||||||
"audio_min_len": 0.0,
|
"audio_min_len": 0.0,
|
||||||
"cif_ckpt_path": None,
|
"cif_ckpt_path": None,
|
||||||
"never_fire": False,
|
"never_fire": False,
|
||||||
|
|
@ -69,6 +69,8 @@ class TranscriptionEngine:
|
||||||
config_dict['transcription'] = not kwargs['no_transcription']
|
config_dict['transcription'] = not kwargs['no_transcription']
|
||||||
if 'no_vad' in kwargs:
|
if 'no_vad' in kwargs:
|
||||||
config_dict['vad'] = not kwargs['no_vad']
|
config_dict['vad'] = not kwargs['no_vad']
|
||||||
|
if 'no_vac' in kwargs:
|
||||||
|
config_dict['vac'] = not kwargs['no_vac']
|
||||||
|
|
||||||
config_dict.pop('no_transcription', None)
|
config_dict.pop('no_transcription', None)
|
||||||
config_dict.pop('no_vad', None)
|
config_dict.pop('no_vad', None)
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ class FFmpegManager:
|
||||||
try:
|
try:
|
||||||
data = await asyncio.wait_for(
|
data = await asyncio.wait_for(
|
||||||
self.process.stdout.read(size),
|
self.process.stdout.read(size),
|
||||||
timeout=5.0
|
timeout=20.0
|
||||||
)
|
)
|
||||||
return data
|
return data
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ class AlignAttConfig(SimulWhisperConfig):
|
||||||
segment_length: float = field(default=1.0, metadata = {"help": "in second"})
|
segment_length: float = field(default=1.0, metadata = {"help": "in second"})
|
||||||
frame_threshold: int = 4
|
frame_threshold: int = 4
|
||||||
rewind_threshold: int = 200
|
rewind_threshold: int = 200
|
||||||
audio_max_len: float = 30.0
|
audio_max_len: float = 20.0
|
||||||
cif_ckpt_path: str = ""
|
cif_ckpt_path: str = ""
|
||||||
never_fire: bool = False
|
never_fire: bool = False
|
||||||
Loading…
Reference in a new issue