Merge pull request #383 from pq-dong/fix-applesilicon

FIX:Demo supports Apple Silicon, resolving issues #18,#272,#9
This commit is contained in:
Wenliang Zhao
2025-04-19 23:59:59 +08:00
committed by GitHub

View File

@@ -105,6 +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",
" model.tts_to_file(text, speaker_id, src_path, speed=speed)\n",
" save_path = f'{output_dir}/output_v2_{speaker_key}.wav'\n",
"\n",