mirror of
https://github.com/myshell-ai/OpenVoice.git
synced 2025-12-16 08:27:48 +01:00
FIX:Demo supports Apple Silicon, resolving issues #18,#272,#9
This commit is contained in:
@@ -105,8 +105,8 @@
|
|||||||
" speaker_key = speaker_key.lower().replace('_', '-')\n",
|
" speaker_key = speaker_key.lower().replace('_', '-')\n",
|
||||||
" \n",
|
" \n",
|
||||||
" source_se = torch.load(f'checkpoints_v2/base_speakers/ses/{speaker_key}.pth', map_location=device)\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
|
" if torch.backends.mps.is_available() and device == 'cpu':\n",
|
||||||
" torch.backends.mps.is_available = lambda: False\n
|
" torch.backends.mps.is_available = lambda: False\n",
|
||||||
" model.tts_to_file(text, speaker_id, src_path, speed=speed)\n",
|
" model.tts_to_file(text, speaker_id, src_path, speed=speed)\n",
|
||||||
" save_path = f'{output_dir}/output_v2_{speaker_key}.wav'\n",
|
" save_path = f'{output_dir}/output_v2_{speaker_key}.wav'\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user