Skip to content

Instantly share code, notes, and snippets.

@teddybear082
teddybear082 / godot-openai-simple.gd
Created December 3, 2023 01:10
Godot4 openai apis addon (place tscn and script in folder called godot-openai-simple inside of project addons folder)
extends Node
## This is a script to query Openai for AI-generated NPC dialogue.
## You need a OpenAI API key for this to work; put it as a string in the export variable for API Key
## See https://platform.openai.com/
## Openai endpoings for speech to text, text generation, text to speech, image generation and image interpretation(vision) are supported.
# Signal used to alert speech recording started
signal STT_speech_recording