juanmc2005 / diart

A python package to build AI-powered real-time audio applications

Home Page:https://diart.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce redundancy in dynamic resampling

juanmc2005 opened this issue · comments

In RealTimeInference, resample before rearrange_audio_stream so the same audio is not resampled multiple times.
Because of how the first 5s buffer is filled at the beginning, this actually means that Resample will be called more times, but (unless it's running on GPU) each call should also be faster because the size of the chunk is reduced by 10 (80k vs 8k samples)