Skip to content

Instantly share code, notes, and snippets.

View rafapg's full-sized avatar
:octocat:

Rafael P Girolineto rafapg

:octocat:
  • São Carlos - SP, Brazil
  • 10:06 (UTC -03:00)
View GitHub Profile
@endolith
endolith / whisper_transcribe.py
Created March 27, 2023 02:33
Transcribe a long audio recording using OpenAI Whisper API
"""
Break up a long recording to fit within the Whisper API's limits, with some
overlap, so no words are missed, and then feed to OpenAI Whisper API to
transcribe it to .txt file. Written by endolith and ChatGPT-4.
"""
import openai
import math
import os
import subprocess