kemuriririn commited on
Commit
b1f350e
·
1 Parent(s): 87762e7

(wip)debug

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -56,6 +56,7 @@ sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR))
56
  from huggingface_hub import snapshot_download
57
  snapshot_download('FunAudioLLM/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
58
  snapshot_download('kemuriririn/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
 
59
  os.system('cd pretrained_models/CosyVoice-ttsfrd/ && pip install ttsfrd_dependency-0.1-py3-none-any.whl && pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl && unzip resource.zip -d .')
60
 
61
  from cosyvoice.cli.cosyvoice import CosyVoice2
@@ -95,15 +96,13 @@ def infer_zeroshot(tts_text, prompt_text, prompt_speech_16k, stream, speed):
95
  for i in cosyvoice.inference_zero_shot(tts_text, prompt_text, prompt_speech_16k, stream=stream, speed=speed):
96
  yield i
97
 
98
-
99
- @spaces.GPU
100
  def get_asr():
101
  global asr_model
102
  if asr_model is not None:
103
  return asr_model
104
  else:
105
  logging.info('asr model load')
106
- model_dir = "FunAudioLLM/SenseVoiceSmall"
107
  asr_model = AutoModel(
108
  model=model_dir,
109
  disable_update=True,
 
56
  from huggingface_hub import snapshot_download
57
  snapshot_download('FunAudioLLM/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
58
  snapshot_download('kemuriririn/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
59
+ snapshot_download('FunAudioLLM/SenseVoiceSmall', local_dir='pretrained_models/SenseVoiceSmall')
60
  os.system('cd pretrained_models/CosyVoice-ttsfrd/ && pip install ttsfrd_dependency-0.1-py3-none-any.whl && pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl && unzip resource.zip -d .')
61
 
62
  from cosyvoice.cli.cosyvoice import CosyVoice2
 
96
  for i in cosyvoice.inference_zero_shot(tts_text, prompt_text, prompt_speech_16k, stream=stream, speed=speed):
97
  yield i
98
 
 
 
99
  def get_asr():
100
  global asr_model
101
  if asr_model is not None:
102
  return asr_model
103
  else:
104
  logging.info('asr model load')
105
+ model_dir = "pretrained_models/SenseVoiceSmall"
106
  asr_model = AutoModel(
107
  model=model_dir,
108
  disable_update=True,