I'm writing some software that will need to do a bit of phonetic analysis. Are there any programs, libraries, or software packages that I can extend to my program which are commonly used for real-time phonetic analysis? I'm aware of software like Praat and WaveSurfer, but to my knowledge I don't think I can send/receive data from them in real time. Asides from those, other NLP tool-kits seem to output on the lexical/phrasal level, which is not the level of analysis I'm looking for.
Doing phonetics analysis is broad term, you should first mention what type of phonetics analysis you are looking for and how is your level of programming.
For the first question we will go into FFT only since it's an algorithm that is fundamental (you can manually check the formants, frequency etc.). If you are not familiar with FFT the simplest definition is that it converts sound waves to frequency-time patterns (you can read more at here). There are numerous FFT packages written for Python, and C++