feat: overlap-window speechbrain enhance, hop 200ms / window 1s
This commit is contained in:
+6
-3
@@ -35,7 +35,8 @@ def main() -> int:
|
||||
ap.add_argument("--enhance-mode", default="auto")
|
||||
ap.add_argument("--enhance-model",
|
||||
default="speechbrain/metricgan-plus-voicebank")
|
||||
ap.add_argument("--enhance-chunk-s", type=float, default=0.2)
|
||||
ap.add_argument("--enhance-chunk-s", type=float, default=1.0)
|
||||
ap.add_argument("--enhance-hop-s", type=float, default=0.2)
|
||||
args = ap.parse_args()
|
||||
|
||||
cam = json.loads(args.camera_json)
|
||||
@@ -57,6 +58,8 @@ def main() -> int:
|
||||
mode=args.enhance_mode,
|
||||
model_source=args.enhance_model,
|
||||
sample_rate=args.audio_rate,
|
||||
chunk_s=args.enhance_chunk_s,
|
||||
hop_s=args.enhance_hop_s,
|
||||
)
|
||||
log.info("audio backend: %s", cleaner.backend)
|
||||
|
||||
@@ -125,8 +128,8 @@ def main() -> int:
|
||||
atrack = rtc.LocalAudioTrack.create_audio_track(
|
||||
f"{identity}-audio", audio_source)
|
||||
|
||||
chunk_s = args.enhance_chunk_s
|
||||
chunk = int(chunk_s * args.audio_rate) # samples per channel
|
||||
hop_s = args.enhance_hop_s
|
||||
chunk = int(hop_s * args.audio_rate) # samples per hop
|
||||
|
||||
async def audio_loop():
|
||||
assert aproc is not None and atrack is not None
|
||||
|
||||
Reference in New Issue
Block a user