mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-17 00:37:43 +01:00
* vc ssr * Add more patches for hf (#1160) * clone and lint #1205 (#1209) * 更新格式 * fix cache path (#1211) Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> * “update" * fix create_commit login (#1210) * support multiple include/exclude filter patterns in command line (#1214) Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> * Use legacy cache (#1215) * fix name (#1216) Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> * fix path name for log accuracy (#1217) * change log msg --------- Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> * fix visibility (#1222) Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> * Merge 1.23 hotfix to master (#1227) * 修复格式问题 * fix 路径问题 * Update test_speech_super_resolution.py * Update test_voice_conversion.py --------- Co-authored-by: tastelikefeet <58414341+tastelikefeet@users.noreply.github.com> Co-authored-by: Yingda Chen <yingdachen@apache.org> Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com> Co-authored-by: zhongyuqi <zhongyuqi@microbt.com>
32 lines
973 B
Python
32 lines
973 B
Python
# Copyright (c) Alibaba, Inc. and its affiliates.
|
|
import unittest
|
|
|
|
from modelscope.pipelines import pipeline
|
|
from modelscope.utils.constant import Tasks
|
|
from modelscope.utils.test_utils import test_level
|
|
|
|
|
|
class HifiSSRTestTask(unittest.TestCase):
|
|
|
|
def setUp(self) -> None:
|
|
self.task = Tasks.speech_super_resolution
|
|
self.model_id = 'ACoderPassBy/HifiSSR'
|
|
|
|
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
|
def test_face_compare(self):
|
|
ref_wav = 'data/test/audios/speaker1_a_en_16k.wav'
|
|
source_wav = 'data/test/audios/speaker1_a_en_16k.wav'
|
|
# out_wav= ''
|
|
inp_data = {
|
|
'ref_wav': ref_wav,
|
|
'source_wav': source_wav,
|
|
'out_wav': ''
|
|
}
|
|
pipe = pipeline(Tasks.speech_super_resolution, model=self.model_id)
|
|
pipe(inp_data) # 输出结果将保存为"out.wav"
|
|
print('ssr success!')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|