We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Speech-to-text
npm install @wfloat/wfloat-web
Serve your recording at /recording.wav.
import { loadSpeechToText } from '@wfloat/wfloat-web';
const model = await loadSpeechToText('openai/whisper-base');
const audio = await fetch('/recording.wav').then(response => response.blob());
const result = await model.transcribe(audio).result();
console.log(result.text);
await model.unload();
npm install @wfloat/react-native-wfloat
cd ios && pod install
Rebuild the app after installation. Native setup.
Replace the URI with a local recording accessible to your app.
import { loadSpeechToText } from '@wfloat/react-native-wfloat';
const model = await loadSpeechToText('openai/whisper-base');
const audio = { uri: 'file:///path/to/recording.wav' };
const result = await model.transcribe(audio).result();
console.log(result.text);
await model.unload();
pip install wfloat
Use a PCM WAV recording.
from wfloat import load_speech_to_text
with load_speech_to_text("openai/whisper-base") as model:
result = model.transcribe("recording.wav")
print(result.text)