Skip to content

Instantly share code, notes, and snippets.

View davidmoore-io's full-sized avatar

David Moore davidmoore-io

View GitHub Profile
@davidmoore-io
davidmoore-io / fast_speech_text_speech.py
Created February 26, 2024 20:59 — forked from thomwolf/fast_speech_text_speech.py
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
@davidmoore-io
davidmoore-io / chatdoc_v0.0.2.py
Last active July 2, 2023 22:40
chatdoc_v0.0.2.py
#python -m pip install openai chromadb langchain unstructured
import os
# get API key from env, 'cause we're grownups
OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY')
# We need things.
# NOTE: Unstructured loaders have many dependencies - https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/unstructured_file.html
@davidmoore-io
davidmoore-io / dev-random-music
Created March 7, 2016 16:38
Have /dev/urandom play you music
brew install sox
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | sox -traw -r44100 -b16 -e unsigned-integer - -tcoreaudio

Keybase proof

I hereby claim:

  • I am davidmoore-io on github.
  • I am davidmoore (https://keybase.io/davidmoore) on keybase.
  • I have a public key ASCgvczUDqWTJtfpbh-HFOL0hKkG7SuGQjcN1WAiU4aPywo

To claim this, I am signing this object: