From 31f874688129462a58e8273a6a2cada20db0b351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=A9fossez?= Date: Thu, 3 Jul 2025 14:52:02 +0200 Subject: [PATCH] some changes --- tts_pytorch.ipynb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tts_pytorch.ipynb b/tts_pytorch.ipynb index 27f2089..c44b396 100644 --- a/tts_pytorch.ipynb +++ b/tts_pytorch.ipynb @@ -7,7 +7,10 @@ "metadata": {}, "outputs": [], "source": [ - "!pip install \"moshi==0.2.7\"" + "!pip install \"moshi==0.2.7\"\n", + "# If running from a Google Colab, you can instead use the following two lines to prevent PyTorch from being reinstalled.\n", + "# !pip install 'sphn < 0.2'# If\n", + "# !pip install --no-deps \"moshi==0.2.7" ] }, { @@ -21,7 +24,6 @@ "import sys\n", "\n", "import numpy as np\n", - "import sphn\n", "import torch\n", "from moshi.models.loaders import CheckpointInfo\n", "from moshi.models.tts import DEFAULT_DSM_TTS_REPO, DEFAULT_DSM_TTS_VOICE_REPO, TTSModel\n", @@ -76,6 +78,7 @@ "print(\"Generating audio...\")\n", "\n", "pcms = []\n", + "@torch.no_grad()\n", "def _on_frame(frame):\n", " print(\"Step\", len(pcms), end=\"\\r\")\n", " if (frame != -1).all():\n",