├── README.md
├── icon.png
├── install.json
├── pinokio.js
├── start.json
├── tts.json
└── win_install_troubleshoot.json
/README.md:
--------------------------------------------------------------------------------
1 | # Audio-webui.pinokio
2 |
3 | One click installer for https://github.com/gitmylo/audio-webui
4 |
5 | # Explanation
6 |
7 | ## install.json
8 |
9 | The install script
10 |
11 | ```json
12 | {
13 | "run": [{
14 | "method": "shell.run",
15 | "params": {
16 | "message": "git clone https://github.com/gitmylo/audio-webui"
17 | }
18 | }, {
19 | "method": "shell.start",
20 | "params": {
21 | "path": "audio-webui"
22 | }
23 | }, {
24 | "method": "shell.enter",
25 | "params": {
26 | "message": "{{os.platform() === 'win32' ? 'python main.py' : 'bash install.sh'}}",
27 | "on": [{
28 | "event": "/Press any key to exit/",
29 | "return": true
30 | }]
31 | }
32 |
33 | }, {
34 | "method": "notify",
35 | "params": {
36 | "html": "Install complete! Click to go to the start script.",
37 | "href": "start.json"
38 | }
39 | }]
40 | }
41 | ```
42 |
43 | 1. The first step runs `shell.run` to clone the audio-webui repository https://github.com/gitmylo/audio-webui
44 | 2. The second one starts a persistent shell session with the default execution path of "audio-webui" (which is where the github repository is downloaded by default)
45 | 3. The third script runs the install script. In case of windows it runs `python main.py`, and for the rest it runs `bash install.sh`
46 | 4. The third `shell.enter` method also waits for a pattern in the terminal that matches `/Press any key to exit/` (regular expression), and when it does, it returns, moving on to the next step.
47 | 5. Finally it displays the notification popup with `notify`, which when clicked, sends you to the start script at [start.json](start.json)
48 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cocktailpeanut/audio-webui.pinokio/86981bc2239916ef2c2e3b5ca5134ea9b3d0dfb0/icon.png
--------------------------------------------------------------------------------
/install.json:
--------------------------------------------------------------------------------
1 | {
2 | "run": [{
3 | "method": "shell.run",
4 | "params": {
5 | "message": "git clone https://github.com/cocktailpeanut/audio-webui"
6 | }
7 | }, {
8 | "method": "shell.run",
9 | "params": {
10 | "message": "{{os.platform() === 'win32' ? '' : 'brew install mecab'}}"
11 | }
12 | }, {
13 | "method": "shell.start",
14 | "params": {
15 | "path": "audio-webui"
16 | }
17 | }, {
18 | "method": "shell.enter",
19 | "params": {
20 | "message": "{{os.platform() === 'win32' ? 'python main.py' : 'bash run.sh'}}",
21 | "on": [{
22 | "event": "/Running on local URL: (http:\/\/[0-9.:]+)/",
23 | "return": "{{event.matches[0][1]}}"
24 | }]
25 | }
26 | }, {
27 | "method": "input",
28 | "params": {
29 | "title": "Install Complete",
30 | "description": "Go back to the dashboard and launch the app!"
31 | }
32 | }, {
33 | "method": "browser.open",
34 | "params": {
35 | "uri": "/?selected=Audio Webui"
36 | }
37 | }]
38 | }
39 |
--------------------------------------------------------------------------------
/pinokio.js:
--------------------------------------------------------------------------------
1 | const os = require('os')
2 | const fs = require('fs')
3 | const path = require("path")
4 | const exists = (filepath) => {
5 | return new Promise(r=>fs.access(filepath, fs.constants.F_OK, e => r(!e)))
6 | }
7 | module.exports = {
8 | "title": "Audio Webui",
9 | "description": "A webui for different audio related Neural Networks",
10 | "icon": "icon.png",
11 | "start": "start.json",
12 | "menu": async (kernel) => {
13 | let installed = await exists(path.resolve(__dirname, "audio-webui", "venv"))
14 | if (installed) {
15 | let session = (await kernel.loader.load(path.resolve(__dirname, "session.json"))).resolved
16 | return [{
17 | "when": "start.json",
18 | "on": " Running",
19 | "type": "label",
20 | }, {
21 | "when": "start.json",
22 | "off": " Launch",
23 | "href": "start.json?fullscreen=true&run=true",
24 | }, {
25 | "when": "start.json",
26 | "on": " Open Web UI",
27 | "href": (session && session.url ? session.url : "http://127.0.0.1:7860"),
28 | "target": "_blank"
29 | }, {
30 | "when": "start.json",
31 | "on": " Server",
32 | "href": "start.json?fullscreen=true"
33 | }]
34 | } else {
35 | return [{
36 | "html": " Install",
37 | "href": "install.json?fullscreen=true&run=true"
38 | }]
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/start.json:
--------------------------------------------------------------------------------
1 | {
2 | "run": [{
3 | "method": "shell.start",
4 | "params": {
5 | "path": "audio-webui"
6 | }
7 | }, {
8 | "method": "shell.enter",
9 | "params": {
10 | "message": "{{os.platform() === 'win32' ? 'python main.py' : 'bash run.sh'}}",
11 | "on": [{
12 | "event": "/Running on local URL: (http:\/\/[0-9.:]+)/",
13 | "return": "{{event.matches[0][1]}}"
14 | }]
15 | }
16 | }, {
17 | "method": "self.set",
18 | "params": {
19 | "session.json": {
20 | "url": "{{input}}"
21 | }
22 | }
23 | }, {
24 | "method": "browser.open",
25 | "params": {
26 | "uri": "/?selected=Audio Webui"
27 | }
28 | }, {
29 | "method": "process.wait"
30 | }]
31 | }
32 |
--------------------------------------------------------------------------------
/tts.json:
--------------------------------------------------------------------------------
1 | {
2 | "run": [{
3 | "method": "shell.run",
4 | "params": {
5 | "message": "brew install mecab"
6 | }
7 | }, {
8 | "method": "shell.run",
9 | "params": {
10 | "message": "pip install TTS"
11 | }
12 | }]
13 | }
14 |
--------------------------------------------------------------------------------
/win_install_troubleshoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "run": [{
3 | "method": "shell.run",
4 | "params": {
5 | "message": "git clone https://github.com/gitmylo/audio-webui"
6 | }
7 | }, {
8 | "method": "shell.run",
9 | "params": {
10 | "message": "activate_only.bat",
11 | "path": "audio-webui"
12 | }
13 | }, {
14 | "method": "shell.run",
15 | "params": {
16 | "message": "pip install --upgrade numpy==1.23.5"
17 | }
18 | }, {
19 | "method": "shell.start",
20 | "params": {
21 | "path": "audio-webui"
22 | }
23 | }, {
24 | "method": "shell.enter",
25 | "params": {
26 | "message": "{{os.platform() === 'win32' ? 'python main.py' : 'bash install.sh'}}",
27 | "on": [{
28 | "event": "/Press any key to exit/",
29 | "return": true
30 | }]
31 | }
32 |
33 | }, {
34 | "method": "notify",
35 | "params": {
36 | "html": "Install complete! Click to go to the start script.",
37 | "href": "start.json"
38 | }
39 | }]
40 | }
41 |
--------------------------------------------------------------------------------