chengsokdara / use-whisper

React hook for OpenAI Whisper with speech recorder, real-time transcription, and silence removal built-in
MIT License
735 stars 139 forks source link

It does not seem to work for any reason #26

Open debugger-anubhav opened 1 year ago

debugger-anubhav commented 1 year ago

Hi @chengsokdara

The package does not seem to work for me for no apparent reason. I added a bunch of extra packages like @ffmpeg/ffmpeg, hark, openai, and recordrtc just to be absolutely sure.

I have a pretty simple setup just for demo purpose and when I start recording I do get the following logs in the console

Screenshot 2023-04-11 at 11 40 48 AM

These do suggest that everything seems to be working fine but when I log the transcript, I always get the following => {blob: undefined, text: undefined} as the output.

My recording status is also true when I am speaking but for some reason the output blob and text is always undefined.

My env:

  1. Mac M1
  2. CRA
  3. React 17.0.2
  4. use-whisper 0.2.0

Following is a snippet of what I have done:

import React from "react";
import {useWhisper} from "@chengsokdara/use-whisper";

const App: React.FC = () => {

  const {startRecording, stopRecording, transcript, recording} = useWhisper({
    apiKey: key,
  });
  console.log("transcript", transcript);
  console.log("recording", recording);
  console.log("...........");

  return (
    <>
      <button onClick={() => startRecording()}>start</button>
    </>
  );
};

export default App;

Thanks in advance Cheers

rahulvramesh commented 1 year ago

same for me