This is a system for searching desired audio files in distributed audio files in assets.
You can search the audio file with ambiguous words or phrases.
This system using OpenAI's embeddings feature.
Clone this repository and open the repository with in Unity
git clone git@github.com:witchpot-studio/UnitySoundSearchDemo.git
Will automatically install dependency files
Open Menu > Witchpot > Editor > Embeddings Window
Add your own OpenAI API key and Organization(optional)
You can generate it in OpenAI web page (Log in is required)
*Note that the API key is saved in Assets\Witchpot\Editor\Scripts\Parameter.asset. It is set gitignore but be careful to avoid pushing it to git.
We already have search example with free asset Free Sound Effects Pack
Please import this asset if you would like to check the actual sound effect.
Open Menu > Witchpot > Editor > Search Window
Add search Prompt and push Search button.
The most related file name will be in search result.
The search is based on the euclidean distance of embeddings of prompt and each audio files name's embeddings.
We need to get every audio files name embeddings and register those embeddings in to container(Scriptable Object) to reduce calling embeddings api.
Hit Create > Witchpot > EmbeddingsContainer in Assets/Witchpot/Editor/Container/
Enter the created container into the container, enter Include folder(All audio files parent folder) in embeddings window
As example, imported GDC 2023 - Game Audio Bundle into Assets/GDC/
Hit the Update button to get all embeddings.
You can search files with using the new container.
Thanks to
This repository is under MIT License.
For more detail please see LICENSE