Skip to content

Instantly share code, notes, and snippets.

View mvsoom's full-sized avatar

Marnix Van Soom mvsoom

View GitHub Profile
@Ga68
Ga68 / stream_openai_response_audio.py
Last active November 1, 2024 08:44
Streams a ChatGPT text-response into a streaming audio-response.
# pip install openai pyaudio python-dotenv
import queue
import threading
from functools import reduce
from typing import Callable, Generator
import openai
import pyaudio
from dotenv import load_dotenv
@championofblocks
championofblocks / wav-mp3
Last active August 15, 2024 11:17
Command line bash to convert all wav to mp3
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done