Skip to content

Commit

Permalink
Add voice samples; Rename file paths;
Browse files Browse the repository at this point in the history
  • Loading branch information
linyiLYi committed May 11, 2024
1 parent d7e2e5c commit 48f3a8a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ pip install -r requirements.txt
python webui.py
```

运行 api 程序,分别使用端口 9880 与 9881 提供派蒙与林亦的语音生成服务:
运行 api 程序,分别使用端口 9880 与 9881 提供派蒙与林亦的语音生成服务,以下请使用 GPT-SoVITS 代码库完成
```
python api.py -s SoVITS_weights/paimeng2_e110_s159940.pth -g GPT_weights/paimeng2-e10.ckpt -dr samples/Paimon/疑问—哇,这个,还有这个…只是和史莱姆打了一场,就有这么多结论吗?.wav -dt "哇,这个,还有这个…只是和史莱姆打了一场,就有这么多结论吗?" -dl "zh" -a 127.0.0.1 -p 9880
python api.py -s SoVITS_weights/xxx_e25_s1150.pth -g GPT_weights/xxx-e50.ckpt -dr "samples/linyi/【愤怒】你这问题太弱智了,我都不知道该从哪开始骂你。.WAV" -dt "你这问题太弱智了,我都不知道该从哪开始骂你。" -dl "zh" -a 127.0.0.1 -p 9881
python api.py -s SoVITS_weights/linyi_e25_s1150.pth -g GPT_weights/linyi-e50.ckpt -dr "samples/linyi/【愤怒】你这问题太弱智了,我都不知道该从哪开始骂你。.WAV" -dt "你这问题太弱智了,我都不知道该从哪开始骂你。" -dl "zh" -a 127.0.0.1 -p 9881
```

运行问答生成程序:
python start_conversation.py
```
python start_qa_dialogue.py
```

## 参考

Expand Down
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions main/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

from mlx_lm import load, generate

# with open('mlx_model/Qwen1.5-32B-Chat/tokenizer_config.json', 'r') as file:
# with open('../models/Qwen1.5-32B-Chat/tokenizer_config.json', 'r') as file:
# tokenizer_config = json.load(file)

with open('mlx_model/Qwen1.5-32B-Chat-FT-4Bit-V2/tokenizer_config.json', 'r') as file:
with open('../models/Qwen1.5-32B-Chat-FT-4Bit/tokenizer_config.json', 'r') as file:
tokenizer_config = json.load(file)

# model, tokenizer = load(
Expand All @@ -15,16 +15,16 @@
# )

model, tokenizer = load(
"mlx_model/Qwen1.5-32B-Chat-FT-4Bit-V2/",
"../models/Qwen1.5-32B-Chat-FT-4Bit/",
tokenizer_config=tokenizer_config
)

sys_msg = 'You are a helpful assistant'

# with open('text/chat_template_qwen_og.txt', 'r') as template_file:
# with open('../text/chat_template.txt', 'r') as template_file:
# template = template_file.read()

with open('text/chat_template_neutral.txt', 'r') as template_file:
with open('../text/chat_template.txt', 'r') as template_file:
template = template_file.read()

while True:
Expand Down
File renamed without changes.

0 comments on commit 48f3a8a

Please sign in to comment.