Updating the notebook to adjust to the change

This commit is contained in:
Shivam Mehta
2024-05-24 11:46:03 +02:00
parent 4b39f6cad0
commit d816c40e3d

View File

@@ -19,7 +19,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "148f4bc0-c28e-4670-9a5e-4c7928ab8992", "id": "148f4bc0-c28e-4670-9a5e-4c7928ab8992",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@@ -192,7 +192,7 @@
"source": [ "source": [
"@torch.inference_mode()\n", "@torch.inference_mode()\n",
"def process_text(text: str):\n", "def process_text(text: str):\n",
" x = torch.tensor(intersperse(text_to_sequence(text, ['english_cleaners2']), 0),dtype=torch.long, device=device)[None]\n", " x = torch.tensor(intersperse(text_to_sequence(text, ['english_cleaners2'])[0], 0),dtype=torch.long, device=device)[None]\n",
" x_lengths = torch.tensor([x.shape[-1]],dtype=torch.long, device=device)\n", " x_lengths = torch.tensor([x.shape[-1]],dtype=torch.long, device=device)\n",
" x_phones = sequence_to_text(x.squeeze(0).tolist())\n", " x_phones = sequence_to_text(x.squeeze(0).tolist())\n",
" return {\n", " return {\n",