FIX:Demo supports Apple Silicon, resolving issues #18,#272,#9

This commit is contained in:
pqdong
2025-04-19 12:36:35 +08:00
committed by GitHub
parent b5d7cd0f29
commit 9574bfe70f

View File

@@ -105,8 +105,8 @@
" speaker_key = speaker_key.lower().replace('_', '-')\n",
" \n",
" source_se = torch.load(f'checkpoints_v2/base_speakers/ses/{speaker_key}.pth', map_location=device)\n",
" if torch.backends.mps.is_available() and device == 'cpu':\n
" torch.backends.mps.is_available = lambda: False\n
" if torch.backends.mps.is_available() and device == 'cpu':\n",
" torch.backends.mps.is_available = lambda: False\n",
" model.tts_to_file(text, speaker_id, src_path, speed=speed)\n",
" save_path = f'{output_dir}/output_v2_{speaker_key}.wav'\n",
"\n",