Spaces:
Running
Running
Add test for fishspeech
Browse files- Dockerfile +1 -0
- discord.json +5 -0
- fishspeech.py +19 -0
- requirements.txt +1 -0
Dockerfile
CHANGED
@@ -26,6 +26,7 @@ COPY ./server.py /discordbot/server.py
|
|
26 |
COPY ./pingpong.py /discordbot/pingpong.py
|
27 |
COPY ./discord_bot.py /discordbot/discord_bot.py
|
28 |
COPY ./horde.py /discordbot/horde.py
|
|
|
29 |
COPY ./discord.json /discordbot/discord.json
|
30 |
|
31 |
CMD ["python", "/discordbot/server.py"]
|
|
|
26 |
COPY ./pingpong.py /discordbot/pingpong.py
|
27 |
COPY ./discord_bot.py /discordbot/discord_bot.py
|
28 |
COPY ./horde.py /discordbot/horde.py
|
29 |
+
COPY ./fishspeech.py /discordbot/fishspeech.py
|
30 |
COPY ./discord.json /discordbot/discord.json
|
31 |
|
32 |
CMD ["python", "/discordbot/server.py"]
|
discord.json
CHANGED
@@ -14,6 +14,11 @@
|
|
14 |
"type": "equals",
|
15 |
"content": "get kudos",
|
16 |
"function": "get_kudos"
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
],
|
19 |
"command": [
|
|
|
14 |
"type": "equals",
|
15 |
"content": "get kudos",
|
16 |
"function": "get_kudos"
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"type": "equals",
|
20 |
+
"content": "test fishspeech",
|
21 |
+
"function": "fishspeech.test"
|
22 |
}
|
23 |
],
|
24 |
"command": [
|
fishspeech.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from gradio_client import Client, file
|
2 |
+
|
3 |
+
async def test():
|
4 |
+
client = Client("fishaudio/fish-speech-1")
|
5 |
+
result = client.predict(
|
6 |
+
text="Hello!!",
|
7 |
+
enable_reference_audio=False,
|
8 |
+
reference_audio=file('https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav'),
|
9 |
+
reference_text="",
|
10 |
+
max_new_tokens=0,
|
11 |
+
chunk_length=200,
|
12 |
+
top_p=0.7,
|
13 |
+
repetition_penalty=1.2,
|
14 |
+
temperature=0.7,
|
15 |
+
batch_infer_num=1,
|
16 |
+
if_load_asr_model=False,
|
17 |
+
api_name="/inference_wrapper"
|
18 |
+
)
|
19 |
+
print(result)
|
requirements.txt
CHANGED
@@ -11,3 +11,4 @@ discord-py-interactions
|
|
11 |
nextcord
|
12 |
httpx
|
13 |
async-eval
|
|
|
|
11 |
nextcord
|
12 |
httpx
|
13 |
async-eval
|
14 |
+
gradio_client
|