CMP400 Project: Can Large Learning Models generate enjoyable narrative content in games compared to content written by a human?
This project contains the source files of my honours project. The builds are either in the submitted folder, or in a linked Google Drive
You can use one of the builds that makes use of my own API keys with Whisper models already embedded to run the application, however if you want to build it yourself:
To build yourself it requires an OpenAI key from OpenAI: https://platform.openai.com/api-keys Then adding it either to "ChatGPTManager.cs" changing the line private readonly OpenAIApi openAI = new(); to include apiKey and organization in the new()
OR
creating a auth.json file with the fields, api_key and organization in a ".openai" of your users folder (C:\Users\YOUR_USER.openai)
To use text to speech with your own API key first create one from Microsoft Azure Speech Cognitive Services. Then using your own API key go to "TextToSpeech.cs" and replace "region" and "subscriptionKey" with your region & API key respectively
Speech to text is handled using https://github.com/Macoron/whisper.unity?tab=readme-ov-file it makes use of quantised Whisper Models from: https://huggingface.co/ggerganov/whisper.cpp Place these in StreamingAssets folder Then change Project Settings > Whisper to use CUDA/Metal (By default it is CPU inference)