make sure to add google credentials to Netbeans:
- Right click on the project
- click on Properties
- click on Actions
- click on Run project
- add the environment variable as follows: Env.GOOGLE_APPLICATION_CREDENTIALS=/Users/florent/Projects/github/speech-to-text/speech-to-text-352619-e6ac4e047752.json
ffmpeg -i video.mp4 -ac 1 audio.flac
-ac 1 needed because the Speech to Text service require only one audio channel