voidful commited on
Commit
f981c67
·
1 Parent(s): 0d802e8

Bound active pace correction to gate margin

Browse files
Files changed (3) hide show
  1. README.md +3 -1
  2. app.py +2 -1
  3. tests/test_release_pins.py +2 -0
README.md CHANGED
@@ -135,7 +135,9 @@ Online pace gate 與 1.5 秒 speaker eligibility 使用和獨立 hosted evaluato
135
  interval union(25 ms frame、10 ms hop、peak -35 dB、absolute RMS floor 1e-4),因此句內或插入的
136
  pause 不會稀釋 CPS。逐 active interval 的 stretcher 曾在固定 root ablation 造成長文 availability
137
  回退,因此仍不切開 active intervals;production 先保留原本的完整 waveform 語速校正,再依
138
- active union duration 對同一完整 waveform 做第二次 bounded、保音高校正,總 stretch rate 不低於 0.80。
 
 
139
 
140
  第一個候選同時通過 local 與 joined whole gate,且符合 early-accept speaker preference 時才會
141
  立即回傳;若 generated-chunk budget
 
135
  interval union(25 ms frame、10 ms hop、peak -35 dB、absolute RMS floor 1e-4),因此句內或插入的
136
  pause 不會稀釋 CPS。逐 active interval 的 stretcher 曾在固定 root ablation 造成長文 availability
137
  回退,因此仍不切開 active intervals;production 先保留原本的完整 waveform 語速校正,再依
138
+ active union duration 只在 active pace 超過 4.2 units/s 時,對同一完整 waveform 做第二次
139
+ bounded、保音高校正;總 stretch rate 不低於 0.80。這保留 4.3 CPS gate 的安全餘量,並避免
140
+ 已在 4.0–4.2 CPS 的完整語音被不必要地拉長。
141
 
142
  第一個候選同時通過 local 與 joined whole gate,且符合 early-accept speaker preference 時才會
143
  立即回傳;若 generated-chunk budget
app.py CHANGED
@@ -93,6 +93,7 @@ ECAPA_REVISION = "0f99f2d0ebe89ac095bcc5903c4dd8f72b367286"
93
  DEFAULT_CFG = 2.0
94
  DEFAULT_STEPS = 10
95
  TARGET_CPS = 4.0
 
96
  MIN_ENDPOINT_CUE_UNITS = 6
97
  SHORT_TEXT_CFG_MIN = 3.0
98
  SHORT_TEXT_CFG_UNITS = 6
@@ -333,7 +334,7 @@ def _generate_chunk(
333
  active_speed = active_pace_correction_speed(
334
  active_duration,
335
  text,
336
- target_cps=TARGET_CPS,
337
  prior_speed=pace_speed,
338
  min_total_speed=MIN_PACE_SPEED,
339
  )
 
93
  DEFAULT_CFG = 2.0
94
  DEFAULT_STEPS = 10
95
  TARGET_CPS = 4.0
96
+ ACTIVE_PACE_TARGET_CPS = 4.20
97
  MIN_ENDPOINT_CUE_UNITS = 6
98
  SHORT_TEXT_CFG_MIN = 3.0
99
  SHORT_TEXT_CFG_UNITS = 6
 
334
  active_speed = active_pace_correction_speed(
335
  active_duration,
336
  text,
337
+ target_cps=ACTIVE_PACE_TARGET_CPS,
338
  prior_speed=pace_speed,
339
  min_total_speed=MIN_PACE_SPEED,
340
  )
tests/test_release_pins.py CHANGED
@@ -289,6 +289,8 @@ def test_chunk_generation_corrects_active_pace_after_total_duration_pace():
289
  < active_pace_index
290
  < second_stretch_index
291
  )
 
 
292
  assert "prior_speed=pace_speed" in generate_source
293
  assert "min_total_speed=MIN_PACE_SPEED" in generate_source
294
 
 
289
  < active_pace_index
290
  < second_stretch_index
291
  )
292
+ assert "target_cps=ACTIVE_PACE_TARGET_CPS" in generate_source
293
+ assert "ACTIVE_PACE_TARGET_CPS = 4.20" in source
294
  assert "prior_speed=pace_speed" in generate_source
295
  assert "min_total_speed=MIN_PACE_SPEED" in generate_source
296