mbitsnbites /
js-sonant
js-sonant is a JavaScript port of the sound synth Sonant, originally implemented in C.
Has homepageArchived
JavaScriptNo license
⑂ 1 forks◯ 0 issuesUpdated May 21, 2026
Project homepage ↗Loading repository data…
lulkien / repository
Sonant is a simple C++ wrapper for recording audio with ALSA and transcribing with Whisper.cpp library.
Sonant is a simple C++ wrapper for recording audio with ALSA and transcribing with Whisper.cpp library.
sudo apt-get install libasound2-dev
sudo pacman -S alsa-lib
git clone https://github.com/ggerganov/whisper.cpp.git
cd whisper.cpp
mkdir build
cd build
cmake ..
make -j
sudo make install
git clone https://github.com/lulkien/sonant.git
cd sonant
mkdir build
cd build
cmake ..
make -j
sudo make install
Include the header file, create a Sonant object, initialize it with your Whisper model, start the recorder, and handle the transcription in your callback.
#include <iostream>
#include <sonant.h>
int main() {
Sonant sonant;
if (!sonant.initialize("/path/to/your/whisper/model")) {
std::cerr << "Failed to initialize Sonant" << std::endl;
return -1;
}
sonant.setTranscriptionCallback([](const std::string& transcription) {
std::cout << "Transcription: " << transcription << std::endl;
});
if (!sonant.startRecorder()) {
std::cerr << "Failed to start recording" << std::endl;
return -1;
}
// Your application logic here
sonant.terminate();
return 0;
}
Always call terminate() before your application exits to ensure proper cleanup.
This project is released into the public domain under the Unlicense.
Selected from shared topics, language and repository description—not editorial ratings.
mbitsnbites /
js-sonant is a JavaScript port of the sound synth Sonant, originally implemented in C.