It's quite cool. Look into Semantic End-of-Turn Detection, also called Semantic Turn Detection or Semantic VAD.
Oh it has a name, cool!
I first did this around 2023 because I needed to make things fast and I was out of other options!