This is a simple voice typing application that uses the Whisper model to convert speech to text. The application is built using Electron.
[!IMPORTANT] Important note: The relying node version needs to match the cpu architecture of the device where this application is going to be used.
To ensure the node version matches the cpu architecture, run the following commands and compare the outputs. If they match, you are good to go. If they don't match, you need to install the correct node version for the cpu architecture.
$ arch
arm64
$ node -e "console.log(process.arch)"
arm64
Install dependencies with prepration for node-addon-api, which will start the build process for the native modules:
$ yarn install
If you want to install dependencies without building the native modules, run the following command:
$ yarn install --ignore-scripts
Prepare node-addon-api which is used to build the native module:
$ node-gyp configure
Build the native module:
$ node-gyp build
$ yarn start
Before building the application, make sure to download the models from the whisper.cpp directory.
$ ./whisper.cpp/models/download-ggml-model.sh tiny
$ ./whisper.cpp/models/download-ggml-model.sh base
$ ./whisper.cpp/models/download-ggml-model.sh small
$ ./whisper.cpp/models/download-ggml-model.sh medium
For platform specific information check .github/workflows scripts, where Linux, MacOS and Windows builds are defined. Output gets generated in /out directory for the current platform.
$ yarn make