🤷🏻‍♂️ Speech to text - whisper?

Guys I need to generate text from a voice command in other words I want to transcribe a speech. If it is real-time transcription it’s great if not I can simply wait for a text to be generated.

I’ve been told whisper can do it but can’t find it in API docs. Can you please help? :pray:


Twitter: @bestbubbledev
Youtube: Best bubble developer
LinkedIn: Gio Kakhiani

I don’t think there is an API for Whisper yet. Since the model is open source, you can implement the same yourself. At the very basic level here is the full code to run it on cpu:

! pip install git+https://github.com/openai/whisper.git -q
import os
import numpy as np
import torch
import pandas as pd
import whisper
import torchaudio
from tqdm.notebook import tqdm
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
options = dict(language='en', beam_size=5, best_of=5, fp16=False)
transcribe_options = dict(task="transcribe", **options)
translate_options = dict(task="translate", **options)
model = whisper.load_model("tiny")
t = model.transcribe("<path to your file>", **transcribe_options)
print(t['text'])
1 Like

Thanks for clarifying! I almost went crazy thinking API was there and I couldn’t find it…

Unfortunately I can’t use that cause I’m a nocode/Bubble developer. I don’t know how to use code :pensive:

I guess I’ll go with Assembly or Rev…