
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
usetranscribe
Advanced tools
A React hook for recording audio or taking in an audio file as input, along with a utility function for audio transcription using OpenAI's API in a Next.js API route handler.
A React hook for recording audio or taking in an audio file as input, along with a utility function for audio transcription using OpenAI's API in a Next.js API route handler.
npm install usetranscribe
useTranscribe HookImport the hook:
import { useTranscribe } from 'usetranscribe';
Destructure the values you need from the hook:
const {
startRecording,
stopRecording,
recording,
result,
audioUrl,
transcribing,
selectAudioFile,
transcribeFile,
handleFileChange,
error
} = useTranscribe();
startRecording: Function to start recording audio.stopRecording: Function to stop the ongoing audio recording.recording: Boolean indicating if currently recording.result: The transcribed result string or undefined.audioUrl: URL of the recorded or selected audio.transcribing: Boolean indicating if transcription is in progress.selectAudioFile: Function to manually select an audio file.transcribeFile: Function to transcribe a manually selected audio file.handleFileChange: Function to handle the file input change event.error: Any errors that occur during the process.transcribeAudio FunctionThis function transcribes an audio file using OpenAI's API.
Note: This function is designed to be used in a Next.js API route handler.
Import the function:
import { transcribeAudio } from 'usetranscribe';
Use the function in your Next.js API route:
const result = await transcribeAudio(audioFile);
OPENAI_API_KEY in your environment variables to use the transcribeAudio function.FAQs
A React hook for recording audio or taking in an audio file as input, along with a utility function for audio transcription using OpenAI's API in a Next.js API route handler.
We found that usetranscribe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.