← chatter-box-dubbing

Add files via upload

42c38596b474acab8641e7d9c1eae3063ea67f06 · SUP3RMASS1VE · Jun 1, 2025 17:57

+340 · 10 files changed

  • README.md +4 −0
  • icon.png binary
  • install.js +47 −0
  • link.js +10 −0
  • pinokio.js +101 −0
  • pinokio_meta.json +4 −0
  • reset.js +8 −0
  • start.js +35 −0
  • torch.js +117 −0
  • update.js +14 −0
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a2084d3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+# chatterbox
+
+A pinokio script for https://github.com/SUP3RMASS1VE/chatterbox-SUP3R
+
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..d11174f
Binary files /dev/null and b/icon.png differ
diff --git a/install.js b/install.js
new file mode 100644
index 0000000..a53d118
--- /dev/null
+++ b/install.js
@@ -0,0 +1,47 @@
+module.exports = {
+  run: [
+    // Edit this step to customize the git repository to use
+    {
+      method: "shell.run",
+      params: {
+        message: [
+          "git clone https://github.com/SUP3RMASS1VE/chatterbox-SUP3R app",
+        ]
+      }
+    },
+    // Delete this step if your project does not use torch
+    {
+      method: "script.start",
+      params: {
+        uri: "torch.js",
+        params: {
+          venv: "env",                // Edit this to customize the venv folder path
+          path: "app",                // Edit this to customize the path to start the shell from
+          // xformers: true   // uncomment this line if your project requires xformers
+          // triton: true   // uncomment this line if your project requires triton
+          // sageattention: true   // uncomment this line if your project requires sageattention
+        }
+      }
+    },
+    // Edit this step with your custom install commands
+    {
+      method: "shell.run",
+      params: {
+        venv: "env",                // Edit this to customize the venv folder path
+        path: "app",                // Edit this to customize the path to start the shell from
+        message: [
+          "uv pip install gradio devicetorch",
+          "uv pip install -r requirements.txt"
+        ]
+      }
+    },
+    {
+      method: "hf.download",
+      params: {
+        path: "app",
+        "_": [ "ResembleAI/chatterbox" ],
+        "include": '"*.json" "*pt"',
+      }
+    }
+  ]
+}
diff --git a/link.js b/link.js
new file mode 100644
index 0000000..dc2247b
--- /dev/null
+++ b/link.js
@@ -0,0 +1,10 @@
+module.exports = {
+  run: [
+    {
+      method: "fs.link",
+      params: {
+        venv: "app/env"
+      }
+    }
+  ]
+}
diff --git a/pinokio.js b/pinokio.js
new file mode 100644
index 0000000..19bd0b2
--- /dev/null
+++ b/pinokio.js
@@ -0,0 +1,101 @@
+const path = require('path')
+module.exports = {
+  version: "3.7",
+  title: "chatterbox",
+  description: "SoTA open-source TTS",
+  icon: "icon.png",
+  menu: async (kernel, info) => {
+    let installed = info.exists("app/env")
+    let running = {
+      install: info.running("install.js"),
+      start: info.running("start.js"),
+      update: info.running("update.js"),
+      reset: info.running("reset.js"),
+      link: info.running("link.js")
+    }
+    if (running.install) {
+      return [{
+        default: true,
+        icon: "fa-solid fa-plug",
+        text: "Installing",
+        href: "install.js",
+      }]
+    } else if (installed) {
+      if (running.start) {
+        let local = info.local("start.js")
+        if (local && local.url) {
+          return [{
+            default: true,
+            icon: "fa-solid fa-rocket",
+            text: "Open Web UI",
+            href: local.url,
+          }, {
+            icon: 'fa-solid fa-terminal',
+            text: "Terminal",
+            href: "start.js",
+          }]
+        } else {
+          return [{
+            default: true,
+            icon: 'fa-solid fa-terminal',
+            text: "Terminal",
+            href: "start.js",
+          }]
+        }
+      } else if (running.update) {
+        return [{
+          default: true,
+          icon: 'fa-solid fa-terminal',
+          text: "Updating",
+          href: "update.js",
+        }]
+      } else if (running.reset) {
+        return [{
+          default: true,
+          icon: 'fa-solid fa-terminal',
+          text: "Resetting",
+          href: "reset.js",
+        }]
+      } else if (running.link) {
+        return [{
+          default: true,
+          icon: 'fa-solid fa-terminal',
+          text: "Deduplicating",
+          href: "link.js",
+        }]
+      } else {
+        return [{
+          default: true,
+          icon: "fa-solid fa-power-off",
+          text: "Start",
+          href: "start.js",
+        }, {
+          icon: "fa-solid fa-plug",
+          text: "Update",
+          href: "update.js",
+        }, {
+          icon: "fa-solid fa-plug",
+          text: "Install",
+          href: "install.js",
+        }, {
+          icon: "fa-solid fa-file-zipper",
+          text: "<div><strong>Save Disk Space</strong><div>Deduplicates redundant library files</div></div>",
+          href: "link.js",
+        }, {
+          icon: "fa-regular fa-circle-xmark",
+          text: "<div><strong>Reset</strong><div>Revert to pre-install state</div></div>",
+          href: "reset.js",
+          confirm: "Are you sure you wish to reset the app?"
+
+        }]
+      }
+    } else {
+      return [{
+        default: true,
+        icon: "fa-solid fa-plug",
+        text: "Install",
+        href: "install.js",
+      }]
+    }
+  }
+}
diff --git a/pinokio_meta.json b/pinokio_meta.json
new file mode 100644
index 0000000..8b451e6
--- /dev/null
+++ b/pinokio_meta.json
@@ -0,0 +1,4 @@
+{
+  "links": [],
+  "posts": []
+}
\ No newline at end of file
diff --git a/reset.js b/reset.js
new file mode 100644
index 0000000..89a3d43
--- /dev/null
+++ b/reset.js
@@ -0,0 +1,8 @@
+module.exports = {
+  run: [{
+    method: "fs.rm",
+    params: {
+      path: "app"
+    }
+  }]
+}
diff --git a/start.js b/start.js
new file mode 100644
index 0000000..d913a8a
--- /dev/null
+++ b/start.js
@@ -0,0 +1,35 @@
+module.exports = {
+  daemon: true,
+  run: [
+    {
+      method: "shell.run",
+      params: {
+        venv: "env",                // Edit this to customize the venv folder path
+        env: { },                   // Edit this to customize environment variables (see documentation)
+        path: "app",                // Edit this to customize the path to start the shell from
+        message: [
+          "python app.py",    // Edit with your custom commands
+        ],
+        on: [{
+          // The regular expression pattern to monitor.
+          // When this pattern occurs in the shell terminal, the shell will return,
+          // and the script will go onto the next step.
+          "event": "/http:\/\/\\S+/",   
+
+          // "done": true will move to the next step while keeping the shell alive.
+          // "kill": true will move to the next step after killing the shell.
+          "done": true
+        }]
+      }
+    },
+    {
+      // This step sets the local variable 'url'.
+      // This local variable will be used in pinokio.js to display the "Open WebUI" tab when the value is set.
+      method: "local.set",
+      params: {
+        // the input.event is the regular expression match object from the previous step
+        url: "{{input.event[0]}}"
+      }
+    }
+  ]
+}
diff --git a/torch.js b/torch.js
new file mode 100644
index 0000000..f0eb976
--- /dev/null
+++ b/torch.js
@@ -0,0 +1,117 @@
+module.exports = {
+  run: [
+    // windows nvidia 50 series
+    {
+      "when": "{{platform === 'win32' && gpu === 'nvidia' && kernel.gpus && kernel.gpus.find(x => / 50.+/.test(x.model))}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": [
+          'uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128',
+          "{{args && args.triton ? 'uv pip install -U --pre triton-windows' : ''}}",
+          "{{args && args.sageattention ? 'uv pip install https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu128torch2.7.0-cp310-cp310-win_amd64.whl' : ''}}",
+        ]
+      },
+      "next": null
+    },
+    // windows nvidia
+    {
+      "when": "{{platform === 'win32' && gpu === 'nvidia'}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": [
+          "uv pip install torch torchvision torchaudio {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu124",
+          "{{args && args.triton ? 'uv pip install -U triton-windows --force-reinstall' : ''}}",
+          "{{args && args.sageattention ? 'uv pip install https://github.com/deepbeepmeep/SageAttention/raw/refs/heads/main/releases/sageattention-2.1.0-cp310-cp310-win_amd64.whl --force-reinstall' : ''}}"
+        ]
+      },
+      "next": null
+    },
+    // windows amd
+    {
+      "when": "{{platform === 'win32' && gpu === 'amd'}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": "uv pip install torch-directml torchaudio torchvision numpy==1.26.4"
+      },
+      "next": null
+    },
+    // windows cpu
+    {
+      "when": "{{platform === 'win32' && (gpu !== 'nvidia' && gpu !== 'amd')}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": "uv pip install torch torchvision torchaudio numpy==1.26.4"
+      },
+      "next": null
+    },
+    // mac
+    {
+      "when": "{{platform === 'darwin'}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": "uv pip install torch torchvision torchaudio"
+      },
+      "next": null
+    },
+    // linux nvidia 50 series
+    {
+      "when": "{{platform === 'linux' && gpu === 'nvidia' && kernel.gpus && kernel.gpus.find(x => / 50.+/.test(x.model))}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": [
+          'uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128',
+          "{{args && args.sageattention ? 'uv pip install git+https://github.com/thu-ml/SageAttention.git' : ''}}"
+        ]
+      },
+      "next": null
+    },
+    // linux nvidia
+    {
+      "when": "{{platform === 'linux' && gpu === 'nvidia'}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": [
+          "uv pip install torch torchvision torchaudio {{args && args.xformers ? 'xformers' : ''}} --index-url https://download.pytorch.org/whl/cu124",
+          "{{args && args.sageattention ? 'uv pip install git+https://github.com/thu-ml/SageAttention.git' : ''}}"
+        ]
+      },
+      "next": null
+    },
+    // linux rocm (amd)
+    {
+      "when": "{{platform === 'linux' && gpu === 'amd'}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": "uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4"
+      },
+      "next": null
+    },
+    // linux cpu
+    {
+      "when": "{{platform === 'linux' && (gpu !== 'amd' && gpu !=='nvidia')}}",
+      "method": "shell.run",
+      "params": {
+        "venv": "{{args && args.venv ? args.venv : null}}",
+        "path": "{{args && args.path ? args.path : '.'}}",
+        "message": "uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu"
+      },
+      "next": null
+    }
+  ]
+}
diff --git a/update.js b/update.js
new file mode 100644
index 0000000..722cd34
--- /dev/null
+++ b/update.js
@@ -0,0 +1,14 @@
+module.exports = {
+  run: [{
+    method: "shell.run",
+    params: {
+      message: "git pull"
+    }
+  }, {
+    method: "shell.run",
+    params: {
+      path: "app",
+      message: "git pull"
+    }
+  }]
+}