Extract audacity audioplayer sourcecode for personnal softwa

Hello,
I am a student in Natural Language Processing.
We have a project in my master’s degree to build a software for a teacher.
The software is built with Php, Python and HTML.
The purpose is to open an audio file with the speech of a person, to have an audio player with the vocal signal and to align it with text translation.
I would like to incorporate the audio player of audacity but I don’t know how I can do that.
Is it possible to get the sourcecode of the audio player and plug it in my script? Or to write a script that can open audacity with an audio file chosen by the user ?
Thanks for your help.

Audacity is not a good choice for this. As you can see from the source code (https://github.com/audacity/audacity), Audacity is massively more complex than your requirements. It would be much easier to just write a simple player using HTML5. This may be a useful reference: https://www.w3schools.com/html/html5_audio.asp