Skip to content

Commit

Permalink
typos fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir committed Jan 31, 2024
1 parent 1dc4719 commit 64d56e6
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions notebooks/284-openvoice/284-openvoice.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"There are 2 models in OpenVoice: first one is responsible for speach generation `BaseSpeakerTTS` and the second one `ToneColorConverter` imposes arbitrary voice tone to the original speech. To convert to OpenVino IR format first we need to get acceptable `torch.nn.Module` object. Both ToneColorConverter, BaseSpeakerTTS instead of using `self.forward` as the main entry point use custom `infer` and `convert_voice` methods respectively, therefore need to wrap them with a custom class that is inherited from torch.nn.Module. \n",
"There are 2 models in OpenVoice: first one is responsible for speech generation `BaseSpeakerTTS` and the second one `ToneColorConverter` imposes arbitrary voice tone to the original speech. To convert to OpenVino IR format first we need to get acceptable `torch.nn.Module` object. Both ToneColorConverter, BaseSpeakerTTS instead of using `self.forward` as the main entry point use custom `infer` and `convert_voice` methods respectively, therefore need to wrap them with a custom class that is inherited from torch.nn.Module. \n",
"\n",
"<!---\n",
"# One more reason to make a wrapper is also that these functions use float arguments while only torch.Tensor and tuple of torch.Tensors are acceptable \n",
Expand All @@ -217,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -237,7 +237,7 @@
" \n",
"class OVOpenVoiceTTS(OVOpenVoiceBase):\n",
" \"\"\"\n",
" Constructor of this class accepts BaseSpeakerTTS object for speach generation and wraps it's 'infer' method with forward.\n",
" Constructor of this class accepts BaseSpeakerTTS object for speech generation and wraps it's 'infer' method with forward.\n",
" \"\"\"\n",
" def get_example_input(self):\n",
" stn_tst = self.voice_model.get_text('this is original text', self.voice_model.hps, False)\n",
Expand Down Expand Up @@ -366,29 +366,13 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e3dc3666c26c432bac345c670fd42c3a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='reference voice from which tone color will be copied', options=('demo_speaker0.mp3', 'de…"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"REFERENCE_VOICES_PATH = f'{repo_dir}/resources/'\n",
"reference_speakers = [\n",
" *[path for path in os.listdir(REFERENCE_VOICES_PATH) if os.path.splitext(path)[-1] == '.mp3'],\n",
" *[path for path in os.listdir(REFERENCE_VOICES_PATH) if os.path.splitext(path)[-1] == '.mp3'],\n",
" 'record_manually',\n",
" 'load_manually',\n",
"]\n",
Expand Down Expand Up @@ -609,8 +593,7 @@
"outputs": [],
"source": [
"if voice_source.value == 'choose_manually':\n",
" upload_orig_voice = widgets.FileUpload(accept=allowed_audio_types, multiple=False, \n",
" description='audo whose tone will be replaced')\n",
" upload_orig_voice = widgets.FileUpload(accept=allowed_audio_types, multiple=False, description='audo whose tone will be replaced')\n",
" display(upload_orig_voice)"
]
},
Expand Down

0 comments on commit 64d56e6

Please sign in to comment.