Running FishSpeech in a more pythonic way #1112
saiakarsh-augnito
started this conversation in
General
Replies: 1 comment
-
|
Thanks a lot. I'm reading the source code about server part. And I plan to rewrite it with FastAPI to build a stronger self-host server. Your code is pythonic and easy to use. Thanks again! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am quite new to fish-speech, and when I went through their documentation, they only provided a CLI version to run their model. I also found it a bit counterintuitive and complex to run those steps. The other issue was when I had to generate multiple audios using CLI, I was loading the model every single time.
If anyone is like me and is more comfortable in the "huggingface way" of running models, I made this script using the existing scripts given in the documentation.
What you get in this script:
hf_hubdirectly, so we provide either the checkpoint path or model name directly!SpeechProfilewhich stores the reference audio codec and uses that to condition speech while generatingHow to setup?
easy_fish.pyand save it in the same folder asfish-speechrepo. Otherwise, you need to update the hydra config path accordinglywith initialize(version_base="1.3", config_path="fish-speech/fish_speech/configs")(ensure its a relative path)hf_hub, you don't need to worry about that!How to run?
Hope someone finds this useful! Thank me later :)
easy_fish.pyBeta Was this translation helpful? Give feedback.
All reactions