Skip to content

Commit 769ef5f

Browse files
authored
debug triton issue in openvoice (#2700)
CVS-161261
1 parent b6e82fe commit 769ef5f

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

.ci/skipped_notebooks.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,6 @@
334334
- ubuntu-20.04
335335
- ubuntu-22.04
336336
- windows-2019
337-
- notebook: notebooks/openvoice/openvoice.ipynb
338-
skips:
339-
- os:
340-
- macos-13
341-
- ubuntu-20.04
342-
- ubuntu-22.04
343-
- windows-2019
344337
- notebook: notebooks/instant-id/instant-id.ipynb
345338
skips:
346339
- os:

notebooks/openvoice/openvoice.ipynb

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@
8282
" )\n",
8383
" open(\"cmd_helper.py\", \"w\").write(r.text)\n",
8484
"\n",
85-
"\n",
86-
"from notebook_utils import download_file, device_widget"
85+
"if not Path(\"pip_helper.py\").exists():\n",
86+
" r = requests.get(\n",
87+
" url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/utils/pip_helper.py\",\n",
88+
" )\n",
89+
" open(\"pip_helper.py\", \"w\").write(r.text)"
8790
]
8891
},
8992
{
@@ -95,6 +98,8 @@
9598
"from pathlib import Path\n",
9699
"\n",
97100
"from cmd_helper import clone_repo\n",
101+
"from pip_helper import pip_install\n",
102+
"import platform\n",
98103
"\n",
99104
"\n",
100105
"repo_dir = Path(\"OpenVoice\")\n",
@@ -103,9 +108,9 @@
103108
" clone_repo(\"https://github.com/myshell-ai/OpenVoice\")\n",
104109
" orig_english_path = Path(\"OpenVoice/openvoice/text/_orig_english.py\")\n",
105110
" english_path = Path(\"OpenVoice/openvoice/text/english.py\")\n",
106-
" \n",
111+
"\n",
107112
" english_path.rename(orig_english_path)\n",
108-
" \n",
113+
"\n",
109114
" with orig_english_path.open(\"r\") as f:\n",
110115
" data = f.read()\n",
111116
" data = data.replace(\"unidecode\", \"anyascii\")\n",
@@ -116,13 +121,33 @@
116121
"# fix a problem with silero downloading and installing\n",
117122
"with Path(\"OpenVoice/openvoice/se_extractor.py\").open(\"r\") as orig_file:\n",
118123
" data = orig_file.read()\n",
119-
" data = data.replace(\"method=\\\"silero\\\"\", \"method=\\\"silero:3.0\\\"\")\n",
124+
" data = data.replace('method=\"silero\"', 'method=\"silero:3.0\"')\n",
120125
" with Path(\"OpenVoice/openvoice/se_extractor.py\").open(\"w\") as out_f:\n",
121-
" out_f.write(data)\n",
122-
"\n",
126+
" out_f.write(data)\n",
127+
"\n",
128+
"\n",
129+
"pip_install(\"librosa>=0.8.1\", \"pydub>=0.25.1\", \"tqdm\", \"inflect>=7.0.0\", \"pypinyin>=0.50.0\", \"openvino>=2023.3\", \"gradio>=4.15\")\n",
130+
"pip_install(\n",
131+
" \"--extra-index-url\",\n",
132+
" \"https://download.pytorch.org/whl/cpu\",\n",
133+
" \"wavmark>=0.0.3\",\n",
134+
" \"faster-whisper>=0.9.0\",\n",
135+
" \"eng_to_ipa>=0.0.2\",\n",
136+
" \"cn2an>=0.5.22\",\n",
137+
" \"jieba>=0.42.1\",\n",
138+
" \"langid>=1.1.6\",\n",
139+
" \"ipywebrtc\",\n",
140+
" \"anyascii\",\n",
141+
" \"torch>=2.1\",\n",
142+
" \"nncf>=2.11.0\",\n",
143+
" \"dtw-python\",\n",
144+
" \"more-itertools\",\n",
145+
" \"tiktoken\",\n",
146+
")\n",
147+
"pip_install(\"--no-deps\", \"whisper-timestamped>=1.14.2\", \"openai-whisper\")\n",
123148
"\n",
124-
"%pip install -q \"librosa>=0.8.1\" \"wavmark>=0.0.3\" \"faster-whisper>=0.9.0\" \"pydub>=0.25.1\" \"whisper-timestamped>=1.14.2\" \"tqdm\" \"inflect>=7.0.0\" \"eng_to_ipa>=0.0.2\" \"pypinyin>=0.50.0\" \\\n",
125-
"\"cn2an>=0.5.22\" \"jieba>=0.42.1\" \"langid>=1.1.6\" \"gradio>=4.15\" \"ipywebrtc\" \"anyascii\" \"openvino>=2023.3\" \"torch>=2.1\" \"nncf>=2.11.0\""
149+
"if platform.system() == \"Darwin\":\n",
150+
" pip_install(\"numpy<2.0\")"
126151
]
127152
},
128153
{
@@ -156,6 +181,7 @@
156181
"import openvino as ov\n",
157182
"import ipywidgets as widgets\n",
158183
"from IPython.display import Audio\n",
184+
"from notebook_utils import download_file, device_widget\n",
159185
"\n",
160186
"core = ov.Core()\n",
161187
"\n",

0 commit comments

Comments
 (0)