Skip to content

Instantly share code, notes, and snippets.

@dgnsrekt
dgnsrekt / quick_wine_script.py
Created December 8, 2021 17:51
quick_wine_script.py
from requests_html import HTMLSession
import pydantic
class WineModel(pydantic.BaseModel):
name: str
price: str
varietal: str
description: str
@dgnsrekt
dgnsrekt / chatGPTTextToSpeech.js
Created January 16, 2023 08:23
Chat GPT TTS in chrome written and refactor by ChatGPT.
function readOutWords(words) {
var utterance = new SpeechSynthesisUtterance(words)
utterance.rate = 1;
utterance.pitch = 0.85;
window.speechSynthesis.speak(utterance);
}
let lastSentences = [];
function readSentence(string) {
@dgnsrekt
dgnsrekt / talkToChatGPT.js
Last active January 25, 2023 02:47
Talk to ChatGPT in the browser.
let lastSentences = [];
const targetNode = document.getElementsByTagName("main")[0];
const observer = new MutationObserver(onMutation);
const textArea = document.getElementsByTagName('textarea')[0];
let listening = false;
function readOutWords(words) {
const utterance = new SpeechSynthesisUtterance(words);
utterance.rate = 1;
utterance.pitch = 0.85;
@dgnsrekt
dgnsrekt / trekGPT.js
Last active January 18, 2023 22:33
This version listens for the wake word computer.
let lastSentences = [];
let listening = false;
let voiceResponse = true;
const inChat = window.location.hostname === "chat.openai.com";
const targetNode = document.getElementsByTagName("main")[0];
const observer = new MutationObserver(onMutation);
const textArea = document.getElementsByTagName("textarea")[0];
const synth = window.speechSynthesis;
const WAKE_WORD = "computer";
@dgnsrekt
dgnsrekt / trekGPT.js
Last active January 30, 2023 04:18
tampermonkey version of trekGPT - https://greasyfork.org/en/scripts/458665-trekgpt
// ==UserScript==
// @name trekGPT
// @namespace https://gist.github.com/dgnsrekt
// @version 0.6
// @description Use chat GPT like the Star Trek TNG LCARS OS. Has TTS & STT. Plus common TNG sound effects.
// @author dgnsrekt
// @match https://chat.openai.com/chat
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// @grant none
// @license MIT