Changelog: 1.1.1 Fixed double audio/ double lyrics in karaoke
Do you need support or help with the installation?
Offer me a coffee and contact me on Discord! #dmkal
Kris.TZA.D.s.Video.-.Aug.4.2024.mp4
SongGen is a FoundryVTT module that integrates with Suno API for generating songs and OpenAI API for creating karaoke lyrics from ambient sounds. This module allows you to dynamically create music for your game sessions and add karaoke effects to your ambient sounds.
- Song Generator: Generate custom music using the Suno API.
- Karaoke Mode: Transcribe ambient sound audio and display synchronized lyrics using OpenAI's Whisper and GPT-4 models.
- Macro Integration: Automatically saves the karaoke sequence as a macro for future use, avoiding repetitive API calls.
- Visit Suno.ai: Go to Suno.ai and log into your account.
- Open Developer Tools: In your browser, press
F12or right-click and selectInspectto open the Developer Tools. - Go to the Network Tab: Click on the "Network" tab and refresh the page.
- Find the Cookie: Locate a request with the keyword
client?_clerk_js_versionin its name. - Copy the Cookie: Click on the request, go to the "Headers" tab, find the
Cookiefield, and copy the entire value.
-
Clone and Deploy: Click the button below to clone the Suno API project and deploy it to Vercel:
-
Add Environment Variable: In the Vercel dashboard, add the environment variable
SUNO_COOKIEwith the value of the cookie you copied from the previous step.
- Deploy the Project: After configuring the environment variable, deploy the project.
- Test the Deployment: Visit
https://<your-vercel-domain>/api/get_limitto confirm the deployment is successful. You should see your API usage and limit information.
- Sign Up/Log In: Go to OpenAI and create an account or log in if you already have one.
- Create API Key: Navigate to the API section and create a new API key.
- Copy API Key: Make sure to copy the key and store it securely, as you'll need to input it into the module settings.
- Download the Module: Install the SongGen module via FoundryVTT's Add-on Modules interface.
- Configure Settings:
- Open the module settings and set the Suno API Base URL to your deployed Vercel app's URL.
- Set the OpenAI API Key to the key you generated from the OpenAI platform.
- Open the Song Generator: Click the "Piano" icon on the left sidebar and select the "+" button to open the Song Generator form.
- Fill in the Details: Provide the song theme, tags, title, and whether you want instrumental or vocal music.
- Generate and Download: Click "Generate Song" to create the music. The song will automatically be downloaded to your computer.
- Select an Ambient Sound: Go to the Ambient Sound Controls and select the sound you want to add karaoke effects to.
- Run Karaoke: Click the microphone stand icon in the Ambient Sound Controls toolbar. If a macro for the selected sound already exists, it will be executed. Otherwise, the module will generate lyrics, create a sequence, and save it as a macro for future use.
- API Key Issues: Ensure your OpenAI API key is correctly set in the module settings.
- Deployment Errors: Double-check your Vercel environment variable setup and make sure the Suno API is correctly deployed.
Contributions are welcome! Feel free to fork the project and submit a pull request. If you encounter any issues, please report them on the project's GitHub page.
This module is released under the MIT License. See LICENSE for more details.