Some problems with the current transcription code might only be solvable by integrating some C code into it. The problem is that the thread recording audio is potentially too slow, causing chunks of audio to be missed.
This can be resolved by write C code that efficiently runs in the background recording audio, filtering it, and storing the recordings in a queue to be processed. This can be accomplished through ctypes in python.
This is the only part of the code that can benefit from the speedup, since the actual transcription process is API bound, with no loss in data due to speed. Further testing/debugging should be done before proceeding.
Some problems with the current transcription code might only be solvable by integrating some C code into it. The problem is that the thread recording audio is potentially too slow, causing chunks of audio to be missed.
This can be resolved by write C code that efficiently runs in the background recording audio, filtering it, and storing the recordings in a queue to be processed. This can be accomplished through
ctypes
in python.This is the only part of the code that can benefit from the speedup, since the actual transcription process is API bound, with no loss in data due to speed. Further testing/debugging should be done before proceeding.