I need a code to get the current value of the waveform from an audio file at specific frame I would like to build a function that does something based on the current value of the waveform of an audio.
Inputs:

An audio file: like a speaker object or a path on the hard drive or a track name in VSE or whatever.
Frame number.

Outputs:

A number that represents how high or low the audio is. But I don't need to get the volume which is constant by default (100%). I need to get a number that represents the current point on the waveform.

Is there a python code that does the following? I'll use it for something like visualization and auto move the mouth (auto speak).
I would recommend looking at other forums on python for how to read audio files. This is not possible with blender’s normal API usage. You would need to go through Python.

Pygame. I believe that pygame.mixer can return a sound as an array which will give you the individual samples. This is what you need.
Wave. A module for reading the data in wave audio files.

You may not be able to install these Python packages to blender’s copy of Python, But you might be able to run python externally to convert an audio file into your own, native-Python-readable format for blender to open.