Skip to content

Uses the fish-speech api (tested locally) to pipe generated speech to a discord voice channel via a discord bot.

Notifications You must be signed in to change notification settings

chrismuzyn/fish-speech-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fish-speech-discord

Kind of a manual thing right now, I will pretty this up if even a single person wants it. It is probably possible to use the official fish-speech api, you'll need to change the url and api key, not tested.

Instructions

  1. You will need to run a fish-speech api server separate from this repo

    python3 -m tools.api_server --listen 0.0.0.0:8080 --llama-checkpoint-path "checkpoints/fish-speech-1.5" --decoder-checkpoint-path "checkpoints/fish-speech-1.5/firefly-gan-vq-fsq-8x1024-21hz-generator.pth" --decoder-config-name firefly_gan_vq --compile
  2. Clone the repo

  3. Create a .env with your discord bot token

    DISCORD_TOKEN="<your discord token>"
  4. Install python dependencies

    python3 -m venv venv
    source ./venv/bin/activate
    pip3 install -r requirements.txt

    There are probably some unnecessary reqs in there that carried over from fish-speech's main repo.

  5. The pyproject.toml file is messed up or I am too ignorant, you need to copy fish-speech/fish-speech to the same directory you have fish-discord.py

  6. Modify the python to point to your checkpoints and mp3s (for any zeroshot's you want to do)

    # Copy this section and configure for as many zero shot options you want the bot to have
    @bot.command(name='zeroshot')
    async def zeroshot(ctx):
        prompt = ' '.join(ctx.message.content.split()[1:])
        audio_file = ["./supersmall.mp3"]
        ref_text = ["./supersmall.mp3.txt"]
        idstr = None  # model path
        await fish_request(ctx, prompt, audio_file, ref_text, idstr)
  7. If your API server is not at localhost, you'll need to change the URL in the script.

  8. Run the python script.

    python3 fish-discord.py

About

Uses the fish-speech api (tested locally) to pipe generated speech to a discord voice channel via a discord bot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages