Locally converts recorded audio, like WAV files and MP3s, to text using OpenAI Whisper.
Like other Node wrappers around OpenAI Whisper, this package requires a few tools to work.
Download from the official Python website. For best results, make sure to add Python to the path.
For audio processing.
On Windows via Chocolatey:
choco install ffmpegOn Debian-based Linux:
sudo apt-get install ffmpegProbably the easiest way to install Whisper is using the Python package manager,
pip.
pip install -U openai-whisperTo test your installation:
whisper --helpnpm install @cityssm/whisper-speech-to-textimport speechToText from '@cityssm/whisper-speech-to-text'
const basicTranscription = await speechToText('path/to/audioFile.mp3')
const transcriptionWithOptions = await speechToText('path/to/audioFile.wav', {
whisperPath: 'path/to/whisper',
model: 'large',
language: 'en'
})