Skip to content

Commit 3c066d8

Browse files
fix loading config_fn bug
1 parent 61754c4 commit 3c066d8

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ jobs:
4040
- name: upload
4141
uses: actions/upload-artifact@v1.0.0
4242
with:
43-
name: diffsinger-server-${{ inputs.version }}.zip
43+
name: diffsinger-server-cpu-${{ inputs.version }}.zip
4444
path: ${{ github.workspace }}\diffsinger-server.zip

server.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def readblocks(ustfile):
5757
def acoustic(ustpath:str):
5858
#解析ust文件为diffsinger所需格式
5959
#参考:main.py
60+
wavpath=ustpath[:-4]+".wav"
61+
6062
tempo=120
6163
project=""
6264
voiceDir=""
@@ -94,8 +96,11 @@ def acoustic(ustpath:str):
9496
'input_type': 'phoneme'
9597
}
9698
#合成
97-
DiffSingerE2EInfer.example_run(inp, target=ustpath[:-4]+".wav")
98-
99+
DiffSingerE2EInfer.example_run(inp, target=wavpath)
100+
return {
101+
'path_wav': wavpath,
102+
}
103+
99104
#为了方便调试,把argv配置放外面
100105
root_dir = os.path.dirname(__file__)
101106
sys.argv = [

utils/hparams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def set_hparams(config='', exp_name='', hparams_str='', print_hparams=True, glob
4545
loaded_config = set()
4646

4747
def load_config(config_fn): # deep first
48-
with open(config_fn, encoding='utf-8') as f:
48+
with open(os.path.abspath(".\\"+config_fn), encoding='utf-8') as f:
4949
hparams_ = yaml.safe_load(f)
5050
loaded_config.add(config_fn)
5151
if 'base_config' in hparams_:

0 commit comments

Comments
 (0)