← Back

ofxWhisper

github.com/tettou771/ofxWhisper · @tettou771
OF 0.12 Audio Artificial Intelligence

Transcribes recorded or live microphone audio in real time using the OpenAI Whisper ASR API.

5 0 Last commit 3y ago Created 3y ago

Branches ahead of main

These branches have commits not yet on main — could be unmerged fixes or work in progress worth a look.

windowsSoundBug 1 commit ahead · last commit 3y ago

README

ofxWhisper



ofxWhisper is an openFrameworks addon for transcribing recorded audio or audio files in real-time. This addon sends audio data and uses the OpenAI Whisper ASR API to convert the audio data into text.

Features



Usage



Setup



1. Copy the ofxWhisper folder to the of_v0.X.X_addons/ directory. 2. Add the following dependencies to your project:

Create and initialize an instance



#include "ofxWhisper.h"

ofxWhisper whisper;

void ofApp::setup() {
    whisper.setup("your_api_key_here");
    whisper.setupRecorder(); // Optionally pass a sound device ID
}


Transcribe from file



`` whisper.transcript("sample_speech.mp3");

void ofApp::update() { // Check if the transcript is ready if (whisper.hasTranscript()) { transcript = whisper.getNextTranscript(); transcriptReady = true; } }

Record and transcript

// Space key to record and transcript void ofApp::keyPressed(int key){ if(key == ' '){ if(recorder.isRecording()){ recorder.stopRecording(); }else{ recorder.startRecording(ofToDataPath(ofGetTimestampString()+".wav", true)); } } }

``

Get this addon

HTTPS
SSH