priteshmistry commited on
Commit
2c67984
·
verified ·
1 Parent(s): f1bcb02

Upload 27 files

Browse files
Files changed (28) hide show
  1. .gitattributes +7 -0
  2. ebook2audiobook.egg-info/.github/FUNDING.yml +1 -0
  3. ebook2audiobook.egg-info/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
  4. ebook2audiobook.egg-info/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  5. ebook2audiobook.egg-info/.github/workflows/Docker-Build.yml +191 -0
  6. ebook2audiobook.egg-info/.github/workflows/E2A-Test.yml +246 -0
  7. ebook2audiobook.egg-info/.github/workflows/custom-command.yml +17 -0
  8. ebook2audiobook.egg-info/.github/workflows/oldDockerBasedWorkflows.zip +3 -0
  9. ebook2audiobook.egg-info/.github/workflows/stale.yml +122 -0
  10. ebook2audiobook.egg-info/.github/workflows/update-huggingface-space.yml +118 -0
  11. ebook2audiobook.egg-info/PKG-INFO +491 -0
  12. ebook2audiobook.egg-info/SOURCES.txt +10 -0
  13. ebook2audiobook.egg-info/assets/David_Attenborough_voice_Demo.mp4 +3 -0
  14. ebook2audiobook.egg-info/assets/Google Colab Restart Runtime pic.png +3 -0
  15. ebook2audiobook.egg-info/assets/Rainy_Day_voice_Demo.mp4 +3 -0
  16. ebook2audiobook.egg-info/assets/demo_web_gui.gif +3 -0
  17. ebook2audiobook.egg-info/assets/gui_1.png +3 -0
  18. ebook2audiobook.egg-info/assets/gui_2.png +3 -0
  19. ebook2audiobook.egg-info/assets/gui_3.png +3 -0
  20. ebook2audiobook.egg-info/audiobooks/cli/.gitkeep +0 -0
  21. ebook2audiobook.egg-info/audiobooks/gui/gradio/.gitkeep +0 -0
  22. ebook2audiobook.egg-info/audiobooks/gui/host/.gitkeep +0 -0
  23. ebook2audiobook.egg-info/dependency_links.txt +1 -0
  24. ebook2audiobook.egg-info/dockerfiles/HuggingfaceDockerfile +58 -0
  25. ebook2audiobook.egg-info/dockerfiles/UbuntuCudaDockerfile +43 -0
  26. ebook2audiobook.egg-info/entry_points.txt +2 -0
  27. ebook2audiobook.egg-info/requires.txt +34 -0
  28. ebook2audiobook.egg-info/top_level.txt +1 -0
.gitattributes CHANGED
@@ -40,3 +40,10 @@ assets/gui_1.png filter=lfs diff=lfs merge=lfs -text
40
  assets/gui_2.png filter=lfs diff=lfs merge=lfs -text
41
  assets/gui_3.png filter=lfs diff=lfs merge=lfs -text
42
  assets/Rainy_Day_voice_Demo.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
40
  assets/gui_2.png filter=lfs diff=lfs merge=lfs -text
41
  assets/gui_3.png filter=lfs diff=lfs merge=lfs -text
42
  assets/Rainy_Day_voice_Demo.mp4 filter=lfs diff=lfs merge=lfs -text
43
+ ebook2audiobook.egg-info/assets/David_Attenborough_voice_Demo.mp4 filter=lfs diff=lfs merge=lfs -text
44
+ ebook2audiobook.egg-info/assets/demo_web_gui.gif filter=lfs diff=lfs merge=lfs -text
45
+ ebook2audiobook.egg-info/assets/Google[[:space:]]Colab[[:space:]]Restart[[:space:]]Runtime[[:space:]]pic.png filter=lfs diff=lfs merge=lfs -text
46
+ ebook2audiobook.egg-info/assets/gui_1.png filter=lfs diff=lfs merge=lfs -text
47
+ ebook2audiobook.egg-info/assets/gui_2.png filter=lfs diff=lfs merge=lfs -text
48
+ ebook2audiobook.egg-info/assets/gui_3.png filter=lfs diff=lfs merge=lfs -text
49
+ ebook2audiobook.egg-info/assets/Rainy_Day_voice_Demo.mp4 filter=lfs diff=lfs merge=lfs -text
ebook2audiobook.egg-info/.github/FUNDING.yml ADDED
@@ -0,0 +1 @@
 
 
1
+ ko_fi: athomasson2
ebook2audiobook.egg-info/.github/ISSUE_TEMPLATE/bug_report.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Bug report
3
+ about: Info requested for each issue
4
+ title: 'Issue Report'
5
+ labels: 'Issue Report'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **This is just a rudimentary guide, don't be too intimidated, You don't have to follow this to the tee**
11
+ **BEFORE TO OPEN AN ISSUE, MAKE SURE THAT IT HASN'T ALREADY BEEN SOLVED OR REPORTED. :)**
12
+ **Check it with the issue search field**
13
+
14
+ **Script Mode**
15
+ - Native, Docker, Unraid
16
+
17
+ **Script Version**
18
+ - in VERSION.txt or on the terminal when the script starts
19
+
20
+ **Process Mode**
21
+ - Gradio, Headless
22
+
23
+ **Operating System:**
24
+ - Windows, Linux, MacOS
25
+
26
+ **Command Line used to start ebook2audiobook**
27
+ - provide the exact command line
28
+
29
+ **Describe the bug**
30
+ A clear and concise description of what the bug is.
31
+
32
+ **Terminal log**
33
+ Provide the full terminal log from the command line
ebook2audiobook.egg-info/.github/ISSUE_TEMPLATE/feature_request.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: Feature request
3
+ about: New Feature
4
+ title: 'Request a feature'
5
+ labels: 'Feature Request'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **BEFORE TO OPEN A NEW FEATURE REQUEST, MAKE SURE IT HASN'T ALREADY BEEN CREATED. :)**
11
+ **Check it with the issue search field or in Discussions thumbnail**
12
+
13
+ **Describe the feature**
14
+ A clear and concise description of what you need.
15
+
16
+ **Screenshot schema or code**
17
+ Provide a maximum of elements to help us to understand and create this new feature
ebook2audiobook.egg-info/.github/workflows/Docker-Build.yml ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Docker Build
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ wipeAndReinstall:
7
+ type: boolean
8
+ description: 'Wipe & Re-Install E2A'
9
+
10
+ workflow_run:
11
+ workflows: ["Mac E2A Test"]
12
+ types:
13
+ - completed
14
+ branches:
15
+ - main
16
+
17
+ jobs:
18
+ DockerBuild:
19
+ runs-on: [self-hosted, macos]
20
+ steps:
21
+
22
+ - name: Wipe & Re-Clone E2A E2ADockerBuild
23
+ if: ${{ inputs.wipeAndReinstall }}
24
+ run: rm -rf ~/E2ADockerBuild/ebook2audiobook
25
+
26
+ - name: Clone ebook2audiobook
27
+ shell: bash
28
+ run: |
29
+ set -e
30
+
31
+ REPO_DIR=~/E2ADockerBuild/ebook2audiobook
32
+ REPO_URL="https://github.com/${{ github.repository }}"
33
+ IS_PR="${{ github.event_name == 'pull_request' }}"
34
+ BASE_REF="${{ github.event.pull_request.base.ref }}"
35
+ HEAD_REF="${{ github.event.pull_request.head.ref }}"
36
+ HEAD_SHA="${{ github.event.pull_request.head.sha }}"
37
+ TRIGGER_SHA="${{ github.sha }}"
38
+ FRESH_CLONE=0
39
+
40
+ echo "==> Event: ${{ github.event_name }}"
41
+ echo "==> Repo: $REPO_URL"
42
+
43
+ # Clone or reuse
44
+ if [ -d "$REPO_DIR" ]; then
45
+ echo "==> Reusing existing repo"
46
+ cd "$REPO_DIR"
47
+ # Set correct remote and fix ambiguous refs
48
+ git remote set-url origin "$REPO_URL"
49
+ git remote set-head origin -a
50
+ git remote prune origin
51
+ git fetch --all --prune
52
+
53
+ echo "==> Cleaning working directory"
54
+ git reset --hard
55
+ else
56
+ echo "==> Cloning fresh"
57
+ git clone "$REPO_URL" "$REPO_DIR"
58
+ cd "$REPO_DIR"
59
+ git remote set-head origin -a
60
+ git remote prune origin
61
+ git fetch --all --prune
62
+ FRESH_CLONE=1
63
+ fi
64
+
65
+ if [ "$IS_PR" = "true" ]; then
66
+ echo "==> PR detected: simulating GitHub merge (base: $BASE_REF ← head: $HEAD_REF)"
67
+
68
+ # Fetch both branches
69
+ git fetch origin "$BASE_REF":"origin/$BASE_REF"
70
+ git fetch origin "$HEAD_REF":"origin/$HEAD_REF"
71
+
72
+ # Reset to base branch
73
+ git checkout -B "$BASE_REF" "remotes/origin/$BASE_REF"
74
+ git reset --hard "origin/$BASE_REF"
75
+
76
+ # Merge PR source
77
+ if ! git merge --no-ff --no-edit "origin/$HEAD_REF"; then
78
+ echo "❌ Merge conflict simulating PR merge"
79
+ exit 1
80
+ fi
81
+ else
82
+ echo "==> Not a PR: checking out triggered commit directly"
83
+ git fetch origin "$TRIGGER_SHA"
84
+ git checkout --detach "$TRIGGER_SHA"
85
+ git reset --hard "$TRIGGER_SHA"
86
+ fi
87
+
88
+ echo "==> Final repo state:"
89
+ git status
90
+ git log -1 --oneline
91
+
92
+ if [ "$FRESH_CLONE" -eq 1 ]; then
93
+ echo "==> Running ./ebook2audiobook.sh --help because this was a fresh clone"
94
+ if ! ./ebook2audiobook.sh --help; then
95
+ echo "==> Attempting fallback with conda deactivation"
96
+ source "$(conda info --base 2>/dev/null)/etc/profile.d/conda.sh" 2>/dev/null && conda deactivate || true
97
+ ./ebook2audiobook.sh --help
98
+ fi
99
+ else
100
+ echo "==> Skipping script run because repo already existed"
101
+ fi
102
+
103
+ - name: Set up Docker Buildx
104
+ uses: docker/setup-buildx-action@v2
105
+ with:
106
+ driver: docker-container
107
+ buildkitd-flags: "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host"
108
+
109
+ - name: Log in to Docker Hub
110
+ uses: docker/login-action@v2
111
+ with:
112
+ username: ${{ secrets.DOCKER_USERNAME }}
113
+ password: ${{ secrets.DOCKER_PASSWORD }}
114
+
115
+ - name: Get Git Commit Hash
116
+ run: echo "GIT_HASH=${GITHUB_SHA::9}" >> $GITHUB_ENV
117
+
118
+ - name: Get Latest Release Tag
119
+ run: |
120
+ TAG=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
121
+ if [ -z "$TAG" ] || [ "$TAG" == "null" ]; then TAG="latest"; fi
122
+ echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
123
+
124
+ - name: Debug Print Variables
125
+ run: |
126
+ echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}"
127
+ echo "GIT_HASH=${GIT_HASH}"
128
+ echo "RELEASE_TAG=${RELEASE_TAG}"
129
+
130
+ - name: Build and Push Release Docker Image
131
+ run: |
132
+ cd ~/E2ADockerBuild/ebook2audiobook
133
+ docker buildx build --pull --platform linux/amd64,linux/arm64 \
134
+ -t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:${GIT_HASH} \
135
+ -t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:${RELEASE_TAG} \
136
+ -t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:latest \
137
+ --push .
138
+
139
+ - name: Prune docker & buildx
140
+ run: |
141
+ docker system prune -af --volumes
142
+ docker buildx prune -af
143
+
144
+ huggingface-build:
145
+ runs-on: [self-hosted, macos]
146
+ steps:
147
+
148
+ - name: Wipe & Re-Clone E2A E2ADockerBuild
149
+ if: ${{ inputs.wipeAndReinstall }}
150
+ run: rm -rf ~/E2ADockerBuild/ebook2audiobook
151
+
152
+ - name: Clone ebook2audiobook into E2ADockerBuild
153
+ shell: bash
154
+ run: |
155
+ if [ -d ~/E2ADockerBuild/ebook2audiobook ]; then
156
+ cd ~/E2ADockerBuild/ebook2audiobook
157
+ git fetch --all
158
+ git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
159
+ else
160
+ git clone https://github.com/DrewThomasson/ebook2audiobook.git ~/E2ADockerBuild/ebook2audiobook
161
+ cd ~/E2ADockerBuild/ebook2audiobook
162
+ git fetch --all
163
+ git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
164
+ fi
165
+
166
+ - name: Set up Docker Buildx
167
+ uses: docker/setup-buildx-action@v2
168
+ with:
169
+ driver: docker-container
170
+ buildkitd-flags: "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host"
171
+
172
+ - name: Log in to Docker Hub
173
+ uses: docker/login-action@v2
174
+ with:
175
+ username: ${{ secrets.DOCKER_USERNAME }}
176
+ password: ${{ secrets.DOCKER_PASSWORD }}
177
+
178
+ - name: Build and Push Huggingface Docker Image
179
+ run: |
180
+ cd ~/E2ADockerBuild/ebook2audiobook
181
+ docker buildx build --platform linux/amd64 \
182
+ -f dockerfiles/HuggingfaceDockerfile \
183
+ -t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:HuggingfaceSpace \
184
+ --push .
185
+
186
+ - name: Prune docker & buildx
187
+ run: |
188
+ docker system prune -af --volumes
189
+ docker buildx prune -af
190
+
191
+
ebook2audiobook.egg-info/.github/workflows/E2A-Test.yml ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Mac E2A Test
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ wipeAndReinstall:
7
+ type: boolean
8
+ description: 'Wipe & Re-Install E2A'
9
+
10
+ pull_request:
11
+ branches:
12
+ - main
13
+ types:
14
+ - opened
15
+ - synchronize
16
+ - reopened
17
+ paths-ignore:
18
+ - CODE_OF_CONDUCT.md
19
+ - LICENSE
20
+ - README.md
21
+ - readme/**
22
+ - dockerfiles/**
23
+ - Notebooks/**
24
+ - .github/workflows/stale.yml
25
+ - .github/workflows/custom-command.yml
26
+
27
+ push:
28
+ branches:
29
+ - main
30
+ paths-ignore:
31
+ - CODE_OF_CONDUCT.md
32
+ - LICENSE
33
+ - README.md
34
+ - readme/**
35
+ - dockerfiles/**
36
+ - Notebooks/**
37
+ - .github/workflows/stale.yml
38
+ - .github/workflows/custom-command.yml
39
+
40
+ release:
41
+ types:
42
+ - published
43
+
44
+ jobs:
45
+ macos-E2A:
46
+ runs-on: [self-hosted, macos]
47
+
48
+ steps:
49
+
50
+ - name: Print runner info
51
+ shell: bash
52
+ run: |
53
+ echo "Running on:"
54
+ uname -a
55
+ sw_vers
56
+
57
+ - name: Wipe & Re-Install E2A
58
+ if: ${{ inputs.wipeAndReinstall }}
59
+ shell: bash
60
+ run: rm -rf ~/ebook2audiobook
61
+
62
+ - name: Clone ebook2audiobook
63
+ shell: bash
64
+ run: |
65
+ set -e
66
+
67
+ REPO_DIR=~/ebook2audiobook
68
+ REPO_URL="https://github.com/${{ github.repository }}"
69
+ IS_PR="${{ github.event_name == 'pull_request' }}"
70
+ BASE_REF="${{ github.event.pull_request.base.ref }}"
71
+ HEAD_REF="${{ github.event.pull_request.head.ref }}"
72
+ HEAD_SHA="${{ github.event.pull_request.head.sha }}"
73
+ TRIGGER_SHA="${{ github.sha }}"
74
+ FRESH_CLONE=0
75
+
76
+ echo "==> Event: ${{ github.event_name }}"
77
+ echo "==> Repo: $REPO_URL"
78
+
79
+ # Clone or reuse
80
+ if [ -d "$REPO_DIR" ]; then
81
+ echo "==> Reusing existing repo"
82
+ cd "$REPO_DIR"
83
+ # Set correct remote and fix ambiguous refs
84
+ git remote set-url origin "$REPO_URL"
85
+ git remote set-head origin -a
86
+ git remote prune origin
87
+ git fetch --all --prune
88
+
89
+ echo "==> Cleaning working directory"
90
+ git reset --hard
91
+ else
92
+ echo "==> Cloning fresh"
93
+ git clone "$REPO_URL" "$REPO_DIR"
94
+ cd "$REPO_DIR"
95
+ git remote set-head origin -a
96
+ git remote prune origin
97
+ git fetch --all --prune
98
+ FRESH_CLONE=1
99
+ fi
100
+
101
+ if [ "$IS_PR" = "true" ]; then
102
+ echo "==> PR detected: simulating GitHub merge (base: $BASE_REF ← head: $HEAD_REF)"
103
+
104
+ # Fetch both branches
105
+ git fetch origin "$BASE_REF":"origin/$BASE_REF"
106
+ git fetch origin "$HEAD_REF":"origin/$HEAD_REF"
107
+
108
+ # Reset to base branch
109
+ git checkout -B "$BASE_REF" "remotes/origin/$BASE_REF"
110
+ git reset --hard "origin/$BASE_REF"
111
+
112
+ # Merge PR source
113
+ if ! git merge --no-ff --no-edit "origin/$HEAD_REF"; then
114
+ echo "❌ Merge conflict simulating PR merge"
115
+ echo "❌ Initial merge failed, attempting cleanup of __pycache__ and retry..."
116
+
117
+ # Remove known __pycache__ dirs that may cause conflict
118
+ echo "==> Cleaning up untracked files like __pycache__"
119
+ git clean -ffd lib/
120
+
121
+ # Retry the merge
122
+ if ! git merge --no-ff --no-edit "origin/$HEAD_REF"; then
123
+ echo "❌ Merge still failed after cleanup"
124
+ exit 1
125
+ fi
126
+ fi
127
+ else
128
+ echo "==> Not a PR: checking out triggered commit directly"
129
+ git fetch origin "$TRIGGER_SHA"
130
+ git checkout --detach "$TRIGGER_SHA"
131
+ git reset --hard "$TRIGGER_SHA"
132
+ fi
133
+
134
+ echo "==> Final repo state:"
135
+ git status
136
+ git log -1 --oneline
137
+
138
+ if [ "$FRESH_CLONE" -eq 1 ]; then
139
+ echo "==> Running ./ebook2audiobook.sh --help because this was a fresh clone"
140
+ if ! ./ebook2audiobook.sh --help; then
141
+ echo "==> Attempting fallback with conda deactivation"
142
+ source "$(conda info --base 2>/dev/null)/etc/profile.d/conda.sh" 2>/dev/null && conda deactivate || true
143
+ ./ebook2audiobook.sh --help
144
+ fi
145
+ else
146
+ echo "==> Skipping script run because repo already existed"
147
+ fi
148
+
149
+
150
+ - name: Create Audiobook Output folders for Artifacts
151
+ shell: bash
152
+ run: |
153
+ mkdir -p ~/ebook2audiobook/audiobooks/{TACOTRON2,FAIRSEQ,UnFAIRSEQ,VITS,YOURTTS,XTTSv2,XTTSv2FineTune,BARK}
154
+ find ~/ebook2audiobook/audiobooks/{TACOTRON2,FAIRSEQ,UnFAIRSEQ,VITS,YOURTTS,XTTSv2,XTTSv2FineTune,BARK} -mindepth 1 -exec rm -rf {} +
155
+
156
+ - name: Add set -e at beginning of ebook2audiobook.sh (for error passing)
157
+ shell: bash
158
+ run: |
159
+ echo "Adding set -e at beginning of ebook2audiobook.sh (for error passing)..."
160
+ cd ~/ebook2audiobook
161
+ source "$(conda info --base)/etc/profile.d/conda.sh"
162
+ conda deactivate
163
+ sed -i '' '1s;^;set -e\n;' ebook2audiobook.sh
164
+
165
+ - name: English TACOTRON2 Custom-Voice headless single test
166
+ shell: bash
167
+ run: |
168
+ echo "Running English TACOTRON2 Custom-Voice headless single test..."
169
+ cd ~/ebook2audiobook
170
+ source "$(conda info --base)/etc/profile.d/conda.sh"
171
+ conda deactivate
172
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine TACOTRON2 --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/TACOTRON2
173
+
174
+
175
+ - name: English FAIRSEQ Custom-Voice headless single test
176
+ shell: bash
177
+ run: |
178
+ echo "Running English FAIRSEQ Custom-Voice headless single test..."
179
+ cd ~/ebook2audiobook
180
+ source "$(conda info --base)/etc/profile.d/conda.sh"
181
+ conda deactivate
182
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine FAIRSEQ --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/FAIRSEQ
183
+
184
+
185
+ - name: Unusual FAIRSEQ Custom-Voice headless single test
186
+ shell: bash
187
+ run: |
188
+ echo "Running Unusual FAIRSEQ Custom-Voice headless single test..."
189
+ cd ~/ebook2audiobook
190
+ source "$(conda info --base)/etc/profile.d/conda.sh"
191
+ conda deactivate
192
+ ./ebook2audiobook.sh --headless --language urd-script_devanagari --ebook "tools/workflow-testing/urd-script_davanagari-test.txt" --tts_engine FAIRSEQ --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/UnFAIRSEQ
193
+
194
+ - name: English VITS Custom-Voice headless single test
195
+ shell: bash
196
+ run: |
197
+ echo "Running English VITS Custom-Voice headless single test..."
198
+
199
+ cd ~/ebook2audiobook
200
+ source "$(conda info --base)/etc/profile.d/conda.sh"
201
+ conda deactivate
202
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine VITS --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/VITS
203
+
204
+ - name: English YOURTTS Custom-Voice headless batch test
205
+ shell: bash
206
+ run: |
207
+ echo "Running English YOURTTS Custom-Voice headless batch test..."
208
+ cd ~/ebook2audiobook
209
+ source "$(conda info --base)/etc/profile.d/conda.sh"
210
+ conda deactivate
211
+ ./ebook2audiobook.sh --headless --language eng --ebooks_dir "tools/workflow-testing" --tts_engine YOURTTS --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/YOURTTS
212
+
213
+
214
+ - name: Default XTTSv2 headless Custom-Voice single test
215
+ shell: bash
216
+ run: |
217
+ echo "Running Default XTTSv2 headless Custom-Voice single test..."
218
+ cd ~/ebook2audiobook
219
+ source "$(conda info --base)/etc/profile.d/conda.sh"
220
+ conda deactivate
221
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine XTTSv2 --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/XTTSv2
222
+
223
+ - name: English XTTSv2 headless fine-tuned XTTSv2 model single test
224
+ shell: bash
225
+ run: |
226
+ echo "Running English XTTSv2 headless fine-tuned XTTSv2 model single test..."
227
+ cd ~/ebook2audiobook
228
+ source "$(conda info --base)/etc/profile.d/conda.sh"
229
+ conda deactivate
230
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine XTTSv2 --fine_tuned AiExplained --output_dir ~/ebook2audiobook/audiobooks/XTTSv2FineTune
231
+
232
+ - name: English BARK Custom-Voice headless single test
233
+ shell: bash
234
+ run: |
235
+ echo "Running English XTTSv2 headless fine-tuned XTTSv2 model single test..."
236
+ cd ~/ebook2audiobook
237
+ source "$(conda info --base)/etc/profile.d/conda.sh"
238
+ conda deactivate
239
+ ./ebook2audiobook.sh --headless --language eng --ebook "tools/workflow-testing/test1.txt" --tts_engine BARK --voice "voices/eng/elder/male/DavidAttenborough.wav" --output_dir ~/ebook2audiobook/audiobooks/BARK
240
+
241
+ - name: Upload audiobooks folder artifact
242
+ if: always()
243
+ uses: actions/upload-artifact@v4
244
+ with:
245
+ name: audiobooks
246
+ path: ~/ebook2audiobook/audiobooks
ebook2audiobook.egg-info/.github/workflows/custom-command.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Custom Command Runner
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ custom_command:
7
+ description: 'Enter a shell command to run on self-hosted Mac'
8
+ required: true
9
+ default: 'echo Hello from Mac!'
10
+
11
+ jobs:
12
+ CustomCommand:
13
+ runs-on: [self-hosted, macos]
14
+ steps:
15
+ - name: Run Custom Command
16
+ run: |
17
+ eval "${{ github.event.inputs.custom_command }}"
ebook2audiobook.egg-info/.github/workflows/oldDockerBasedWorkflows.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a415c609ac7b16ed6d59f361aac416775d76336dccbf13670d7de373d510aa22
3
+ size 18217
ebook2audiobook.egg-info/.github/workflows/stale.yml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: 'Close stale issues and PRs'
2
+ on:
3
+ schedule:
4
+ - cron: '30 1 * * 0' # Runs Once Every Sunday
5
+
6
+ jobs:
7
+ stale:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ issues: write
11
+ pull-requests: write
12
+ steps:
13
+ - name: Close Stale Issues
14
+ uses: actions/[email protected]
15
+ with:
16
+ # Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
17
+ #repo-token: # optional, default is ${{ github.token }}
18
+ # The message to post on the issue when tagging it. If none provided, will not mark issues stale.
19
+ stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still relevant, please comment or remove the stale label to keep it open.'
20
+ # The message to post on the pull request when tagging it. If none provided, will not mark pull requests stale.
21
+ stale-pr-message: 'This pull request has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Please comment or remove the stale label if you would like to keep it open.'
22
+ # The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
23
+ #close-issue-message: # optional
24
+ # The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests.
25
+ #close-pr-message: # optional
26
+ # The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically.
27
+ days-before-stale: 10
28
+ # The number of days old an issue can be before marking it stale. Set to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding only the issues.
29
+ #days-before-issue-stale: # optional
30
+ # The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests.
31
+ #days-before-pr-stale: # optional
32
+ # The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests.
33
+ days-before-close: 10
34
+ # The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues.
35
+ #days-before-issue-close: # optional
36
+ # The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests.
37
+ #days-before-pr-close: # optional
38
+ # The label to apply when an issue is stale.
39
+ #stale-issue-label: # optional, default is Stale
40
+ # The label to apply when an issue is closed.
41
+ #close-issue-label: # optional
42
+ # The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").
43
+ #exempt-issue-labels: # optional, default is
44
+ # The reason to use when closing an issue.
45
+ #close-issue-reason: # optional, default is not_planned
46
+ # The label to apply when a pull request is stale.
47
+ #stale-pr-label: # optional, default is Stale
48
+ # The label to apply when a pull request is closed.
49
+ #close-pr-label: # optional
50
+ # The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2").
51
+ #exempt-pr-labels: # optional, default is
52
+ # The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2").
53
+ #exempt-milestones: # optional, default is
54
+ # The milestones that mean an issue is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the issues.
55
+ #exempt-issue-milestones: # optional, default is
56
+ # The milestones that mean a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the pull requests.
57
+ #exempt-pr-milestones: # optional, default is
58
+ # Exempt all issues and pull requests with milestones from being marked as stale. Default to false.
59
+ #exempt-all-milestones: # optional, default is false
60
+ # Exempt all issues with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the issues.
61
+ #exempt-all-issue-milestones: # optional, default is
62
+ # Exempt all pull requests with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the pull requests.
63
+ #exempt-all-pr-milestones: # optional, default is
64
+ # Only issues or pull requests with all of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
65
+ #only-labels: # optional, default is
66
+ # Only issues or pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
67
+ #any-of-labels: # optional, default is
68
+ # Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the issues.
69
+ #any-of-issue-labels: # optional, default is
70
+ # Only pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the pull requests.
71
+ #any-of-pr-labels: # optional, default is
72
+ # Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the issues.
73
+ #only-issue-labels: # optional, default is
74
+ # Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the pull requests.
75
+ #only-pr-labels: # optional, default is
76
+ # The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related).
77
+ #operations-per-run: # optional, default is 30
78
+ # Remove stale labels from issues and pull requests when they are updated or commented on.
79
+ #remove-stale-when-updated: # optional, default is true
80
+ # Remove stale labels from issues when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the issues.
81
+ #remove-issue-stale-when-updated: # optional, default is
82
+ # Remove stale labels from pull requests when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the pull requests.
83
+ #remove-pr-stale-when-updated: # optional, default is
84
+ # Run the processor in debug mode without actually performing any operations on live issues.
85
+ #debug-only: # optional, default is false
86
+ # The order to get issues or pull requests. Defaults to false, which is descending.
87
+ #ascending: # optional, default is false
88
+ # Delete the git branch after closing a stale pull request.
89
+ #delete-branch: # optional, default is false
90
+ # The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822).
91
+ #start-date: # optional, default is
92
+ # The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2").
93
+ #exempt-assignees: # optional, default is
94
+ # The assignees which exempt an issue from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues.
95
+ #exempt-issue-assignees: # optional, default is
96
+ # The assignees which exempt a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the pull requests.
97
+ #exempt-pr-assignees: # optional, default is
98
+ # Exempt all issues and pull requests with assignees from being marked as stale. Default to false.
99
+ #exempt-all-assignees: # optional, default is false
100
+ # Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the issues.
101
+ #exempt-all-issue-assignees: # optional, default is
102
+ # Exempt all pull requests with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the pull requests.
103
+ #exempt-all-pr-assignees: # optional, default is
104
+ # Exempt draft pull requests from being marked as stale. Default to false.
105
+ #exempt-draft-pr: # optional, default is false
106
+ # Display some statistics at the end regarding the stale workflow (only when the logs are enabled).
107
+ #enable-statistics: # optional, default is true
108
+ # A comma delimited list of labels to add when an issue or pull request becomes unstale.
109
+ #labels-to-add-when-unstale: # optional, default is
110
+ # A comma delimited list of labels to remove when an issue or pull request becomes stale.
111
+ #labels-to-remove-when-stale: # optional, default is
112
+ # A comma delimited list of labels to remove when an issue or pull request becomes unstale.
113
+ #labels-to-remove-when-unstale: # optional, default is
114
+ # Any update (update/comment) can reset the stale idle time on the issues and pull requests.
115
+ #ignore-updates: # optional, default is false
116
+ # Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues.
117
+ #ignore-issue-updates: # optional, default is
118
+ # Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.
119
+ #ignore-pr-updates: # optional, default is
120
+ # Only the issues or the pull requests with an assignee will be marked as stale automatically.
121
+ #include-only-assigned: # optional, default is false
122
+
ebook2audiobook.egg-info/.github/workflows/update-huggingface-space.yml ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Check and Update Hugging Face Space
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 0 * * *'
6
+ workflow_dispatch:
7
+ inputs:
8
+ space_id:
9
+ description: 'Hugging Face Space ID (format: username/spacename)'
10
+ required: true
11
+ default: 'drewThomasson/ebook2audiobook'
12
+ type: string
13
+ workflow_run:
14
+ workflows: ["Docker Build"]
15
+ types:
16
+ - completed
17
+
18
+ jobs:
19
+ check-space:
20
+ runs-on: ubuntu-latest
21
+ outputs:
22
+ is_running: ${{ steps.check-status.outputs.is_running }}
23
+ space_status: ${{ steps.check-status.outputs.space_status }}
24
+ steps:
25
+ - name: Check out repository
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v4
30
+ with:
31
+ python-version: '3.10'
32
+
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install requests
37
+
38
+ - name: Check Space Status
39
+ id: check-status
40
+ run: |
41
+ python - <<'EOF'
42
+ import requests
43
+ import os
44
+
45
+ def check_space_status(space_id):
46
+ url = f"https://huggingface.co/api/spaces/{space_id}/runtime"
47
+ response = requests.get(url)
48
+ if response.status_code == 200:
49
+ data = response.json()
50
+ status = data.get("stage", "UNKNOWN")
51
+ print(f"Space status: {status}")
52
+ return status
53
+ else:
54
+ print(f"Error: {response.status_code}")
55
+ return "ERROR"
56
+
57
+ space_id = "${{ github.event.inputs.space_id }}"
58
+ status = check_space_status(space_id)
59
+
60
+ # Set output variables
61
+ is_running = "true" if status == "RUNNING" else "false"
62
+ print(f"::set-output name=is_running::{is_running}")
63
+ print(f"::set-output name=space_status::{status}")
64
+ EOF
65
+
66
+ - name: Report Status
67
+ run: |
68
+ echo "Space: ${{ github.event.inputs.space_id }}"
69
+ echo "Status: ${{ steps.check-status.outputs.space_status }}"
70
+ echo "Is Running: ${{ steps.check-status.outputs.is_running }}"
71
+
72
+ update-huggingface:
73
+ runs-on: ubuntu-latest
74
+ needs: check-space
75
+ if: ${{ needs.check-space.outputs.space_status != 'RUNNING' }}
76
+ steps:
77
+ - name: Checkout self repository for VERSION.txt
78
+ uses: actions/checkout@v4
79
+ with:
80
+ path: source
81
+
82
+ - name: Set up Git
83
+ run: |
84
+ git config --global user.name "GitHub Action"
85
+ git config --global user.email "[email protected]"
86
+
87
+ - name: Install Git LFS
88
+ run: |
89
+ curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
90
+ sudo apt-get install git-lfs
91
+ git lfs install
92
+
93
+ - name: Configure Hugging Face credentials
94
+ run: |
95
+ echo "machine hf-prod.huggingface.co login api password ${{ secrets.HUGGINGFACE_TOKEN }}" > ~/.netrc
96
+ echo "machine huggingface.co login api password ${{ secrets.HUGGINGFACE_TOKEN }}" >> ~/.netrc
97
+
98
+ - name: Clone Hugging Face space repository
99
+ run: |
100
+ git clone https://huggingface.co/spaces/drewThomasson/ebook2audiobook
101
+
102
+ - name: Update README and updates.txt in Hugging Face space
103
+ run: |
104
+ # Read version from the source repository's VERSION.txt
105
+ VERSION=$(cat source/VERSION.txt | tr -d ' \t\n')
106
+ echo "Updating README with version $VERSION"
107
+ cd ebook2audiobook
108
+ # Update updates.txt (append or create if it doesn't exist)
109
+ if [ ! -f updates.txt ]; then
110
+ echo "update" > updates.txt
111
+ else
112
+ echo "update" >> updates.txt
113
+ fi
114
+ # Update the version in the README file using sed
115
+ sed -i "s/^title: Ebook2audiobook v[0-9.]\+/title: Ebook2audiobook v$VERSION/" README.md
116
+ git add updates.txt README.md
117
+ git commit -m "Update version in README to $VERSION and add update entry to updates.txt"
118
+ git push
ebook2audiobook.egg-info/PKG-INFO ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: ebook2audiobookXTTS
3
+ Version: 25.2.25
4
+ Summary: Convert eBooks to audiobooks with chapters and metadata
5
+ Home-page: https://github.com/DrewThomasson/ebook2audiobookXTTS
6
+ Author: Drew Thomasson
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: pydub
13
+ Requires-Dist: nltk
14
+ Requires-Dist: beautifulsoup4
15
+ Requires-Dist: ebooklib
16
+ Requires-Dist: translate
17
+ Requires-Dist: tqdm
18
+ Requires-Dist: mecab
19
+ Requires-Dist: mecab-python3
20
+ Requires-Dist: unidic
21
+ Requires-Dist: gradio
22
+ Requires-Dist: docker
23
+ Requires-Dist: coqui-tts==0.25.3
24
+
25
+ # 📚 ebook2audiobook
26
+
27
+ Convert eBooks to audiobooks with chapters and metadata using Calibre and Coqui XTTS. Supports optional voice cloning and multiple languages!
28
+
29
+
30
+ #### 🖥️ Web GUI Interface
31
+ ![demo_web_gui](https://github.com/user-attachments/assets/85af88a7-05dd-4a29-91de-76a14cf5ef06)
32
+
33
+ <details>
34
+ <summary>Click to see images of Web GUI</summary>
35
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/b36c71cf-8e06-484c-a252-934e6b1d0c2f">
36
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/c0dab57a-d2d4-4658-bff9-3842ec90cb40">
37
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/0a99eeac-c521-4b21-8656-e064c1adc528">
38
+ </details>
39
+
40
+ ## README.md
41
+ - en [English](README.md)
42
+ - zh_CN [简体中文](readme/README_CN.md)
43
+
44
+
45
+ ## 🌟 Features
46
+
47
+ - 📖 Converts eBooks to text format with Calibre.
48
+ - 📚 Splits eBook into chapters for organized audio.
49
+ - 🎙️ High-quality text-to-speech with Coqui XTTS.
50
+ - 🗣️ Optional voice cloning with your own voice file.
51
+ - 🌍 Supports multiple languages (English by default).
52
+ - 🖥️ Designed to run on 4GB RAM.
53
+
54
+ ## 🤗 [Huggingface space demo](https://huggingface.co/spaces/drewThomasson/ebook2audiobookXTTS)
55
+ - Huggingface space is running on free cpu tier so expect very slow or timeout lol, just don't give it giant files is all
56
+ - Best to duplicate space or run locally.
57
+
58
+ ## Free Google Colab [![Free Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DrewThomasson/ebook2audiobookXTTS/blob/main/Notebooks/colab_ebook2audiobookxtts.ipynb)
59
+
60
+
61
+ ## 🛠️ Requirements
62
+
63
+ - 4gb ram
64
+ - Virtualization enabled if running on windows (for docker)
65
+
66
+ ### 🔧 Installation Instructions
67
+
68
+ 1. **Clone repo**
69
+ ```bash
70
+ git clone https://github.com/DrewThomasson/ebook2audiobookXTTS.git
71
+ ```
72
+
73
+ 2. **Install ebook2audiobook**:
74
+ - **Linux/MacOS**:
75
+ ```bash
76
+ .\install.sh # Run the .sh install file
77
+ ```
78
+ - **Windows**
79
+ ```bash
80
+ .\install.bat # Run the .bat install file
81
+ ```
82
+
83
+ ## 🌐 Supported Languages
84
+
85
+ - **English (en)**
86
+ - **Spanish (es)**
87
+ - **French (fr)**
88
+ - **German (de)**
89
+ - **Italian (it)**
90
+ - **Portuguese (pt)**
91
+ - **Polish (pl)**
92
+ - **Turkish (tr)**
93
+ - **Russian (ru)**
94
+ - **Dutch (nl)**
95
+ - **Czech (cs)**
96
+ - **Arabic (ar)**
97
+ - **Chinese (zh-cn)**
98
+ - **Japanese (ja)**
99
+ - **Hungarian (hu)**
100
+ - **Korean (ko)**
101
+
102
+ Specify the language code when running the script in headless mode.
103
+ ## 🚀 Usage
104
+
105
+ ### 🖥️ Launching Gradio Web Interface
106
+
107
+ 1. **Run ebook2audiobook**:
108
+ - **Linux/MacOS**:
109
+ ```bash
110
+ .\ebook2audiobook.sh # Run Launch script
111
+ ```
112
+ - **Windows**
113
+ ```bash
114
+ .\ebook2audiobook.cmd # Run launch script
115
+ ```
116
+
117
+ 2. **Open the Web App**: Click the URL provided in the terminal to access the web app and convert eBooks.
118
+ 3. **For Public Link**: Add `--share True` to the end of it like this: `python app.py --share True`
119
+ - **[For More Parameters]**: use the `-h` parameter like this `python app.py -h`
120
+
121
+ ### 📝 Basic Headless Usage
122
+ - **Linux/MacOS**:
123
+ ```bash
124
+ .\ebook2audiobook.sh --headless True --ebook <path_to_ebook_file> --voice [path_to_voice_file] --language [language_code]
125
+ ```
126
+ - **Windows**
127
+ ```bash
128
+ .\ebook2audiobook.cmd --headless True --ebook <path_to_ebook_file> --voice [path_to_voice_file] --language [language_code]
129
+ ```
130
+
131
+ - **<path_to_ebook_file>**: Path to your eBook file.
132
+ - **[path_to_voice_file]**: Optional for voice cloning.
133
+ - **[language_code]**: Optional to specify language.
134
+ - **[For More Parameters]**: use the `-h` parameter like this `python app.py -h`
135
+
136
+ ### 🧩 Headless Custom XTTS Model Usage
137
+ - **Linux/MacOS**:
138
+ ```bash
139
+ .\ebook2audiobook.sh --headless True --use_custom_model True --ebook <ebook_file_path> --voice <target_voice_file_path> --language <language> --custom_model <custom_model_path> --custom_config <custom_config_path> --custom_vocab <custom_vocab_path>
140
+ ```
141
+ - **Windows**
142
+ ```bash
143
+ .\ebook2audiobook.cmd --headless True --use_custom_model True --ebook <ebook_file_path> --voice <target_voice_file_path> --language <language> --custom_model <custom_model_path> --custom_config <custom_config_path> --custom_vocab <custom_vocab_path>
144
+ ```
145
+
146
+ - **<ebook_file_path>**: Path to your eBook file.
147
+ - **<target_voice_file_path>**: Optional for voice cloning.
148
+ - **<language>**: Optional to specify language.
149
+ - **<custom_model_path>**: Path to `model.pth`.
150
+ - **<custom_config_path>**: Path to `config.json`.
151
+ - **<custom_vocab_path>**: Path to `vocab.json`.
152
+ - **[For More Parameters]**: use the `-h` parameter like this `python app.py -h`
153
+
154
+
155
+ ### 🧩 Headless Custom XTTS Model Usage With Zip link to XTTS Fine-Tune Model 🌐
156
+ - **Linux/MacOS**:
157
+ ```bash
158
+ .\ebook2audiobook.sh --headless True --use_custom_model True --ebook <ebook_file_path> --voice <target_voice_file_path> --language <language> --custom_model_url <custom_model_URL_ZIP_path>
159
+ ```
160
+ - **Windows**
161
+ ```bash
162
+ .\ebook2audiobook.cmd --headless True --use_custom_model True --ebook <ebook_file_path> --voice <target_voice_file_path> --language <language> --custom_model_url <custom_model_URL_ZIP_path>
163
+ ```
164
+
165
+ - **<ebook_file_path>**: Path to your eBook file.
166
+ - **<target_voice_file_path>**: Optional for voice cloning.
167
+ - **<language>**: Optional to specify language.
168
+ - **<custom_model_URL_ZIP_path>**: URL Path to zip of Model folder. For Example this for the [xtts_David_Attenborough_fine_tune](https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/tree/main) `https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/resolve/main/Finished_model_files.zip?download=true`
169
+ - For a custom model a ref audio clip of the voice will also be needed:
170
+ [ref audio clip of David Attenborough](https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/blob/main/ref.wav)
171
+ - **[For More Parameters]**: use the `-h` parameter like this `python app.py -h`
172
+
173
+ ### 🔍 For Detailed Guide with list of all Parameters to use
174
+ - **Linux/MacOS**:
175
+ ```bash
176
+ .\ebook2audiobook.sh -h
177
+ ```
178
+ - **Windows**
179
+ ```bash
180
+ .\ebook2audiobook.cmd -h
181
+ ```
182
+
183
+ - This will output the following:
184
+ ```bash
185
+ usage: app.py [-h] [--share] [--headless [HEADLESS]] [--ebook EBOOK]
186
+ [--ebooks_dir [EBOOKS_DIR]] [--voice VOICE] [--language LANGUAGE]
187
+ [--device {cpu,gpu}] [--use_custom_model] [--custom_model CUSTOM_MODEL]
188
+ [--custom_config CUSTOM_CONFIG] [--custom_vocab CUSTOM_VOCAB]
189
+ [--custom_model_url CUSTOM_MODEL_URL] [--temperature TEMPERATURE]
190
+ [--length_penalty LENGTH_PENALTY]
191
+ [--repetition_penalty REPETITION_PENALTY] [--top_k TOP_K] [--top_p TOP_P]
192
+ [--speed SPEED] [--enable_text_splitting]
193
+
194
+ Convert eBooks to Audiobooks using a Text-to-Speech model. You can either launch the Gradio interface or run the script in headless mode for direct conversion.
195
+
196
+ options:
197
+ -h, --help show this help message and exit
198
+ --share Enable a public shareable Gradio link. Defaults to False.
199
+ --headless [HEADLESS]
200
+ Run in headless mode. Defaults to True if the flag is present without a value, False otherwise.
201
+ --ebook EBOOK Path to the ebook file for conversion. Required in headless mode.
202
+ --ebooks_dir [EBOOKS_DIR]
203
+ Path to the directory containing ebooks for batch conversion. Defaults to './ebooks' if 'default' value is provided.
204
+ --voice VOICE Path to the target voice file for TTS. Optional, uses a default voice if not provided.
205
+ --language LANGUAGE Language for the audiobook conversion. Options: en, es, fr, de, it, pt, pl, tr, ru, nl, cs, ar, zh-cn, ja, hu, ko. Defaults to English (en).
206
+ --device {cpu,gpu} Type of processor unit for the audiobook conversion. Defaults to cpu.
207
+ --use_custom_model Use a custom TTS model. Defaults to False. Must be True to use custom models.
208
+ --custom_model CUSTOM_MODEL
209
+ Path to the custom model file (.pth). Required if using a custom model.
210
+ --custom_config CUSTOM_CONFIG
211
+ Path to the custom config file (config.json). Required if using a custom model.
212
+ --custom_vocab CUSTOM_VOCAB
213
+ Path to the custom vocab file (vocab.json). Required if using a custom model.
214
+ --custom_model_url CUSTOM_MODEL_URL
215
+ URL to download the custom model as a zip file. Optional, but will be used if provided. Examples include David Attenborough's model: 'https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/resolve/main/Finished_model_files.zip?download=true'. More XTTS fine-tunes can be found on my Hugging Face at 'https://huggingface.co/drewThomasson'.
216
+ --temperature TEMPERATURE
217
+ Temperature for the model. Defaults to 0.65. Higher temperatures lead to more creative outputs.
218
+ --length_penalty LENGTH_PENALTY
219
+ A length penalty applied to the autoregressive decoder. Defaults to 1.0. Not applied to custom models.
220
+ --repetition_penalty REPETITION_PENALTY
221
+ A penalty that prevents the autoregressive decoder from repeating itself. Defaults to 2.0.
222
+ --top_k TOP_K Top-k sampling. Lower values mean more likely outputs and increased audio generation speed. Defaults to 50.
223
+ --top_p TOP_P Top-p sampling. Lower values mean more likely outputs and increased audio generation speed. Defaults to 0.8.
224
+ --speed SPEED Speed factor for the speech generation. Defaults to 1.0.
225
+ --enable_text_splitting
226
+ Enable splitting text into sentences. Defaults to False.
227
+
228
+ Example usage:
229
+ Windows:
230
+ headless:
231
+ ./ebook2audiobook.cmd --headless --ebook 'path_to_ebook' --voice 'path_to_voice' --language en --use_custom_model --custom_model 'model.zip' --custom_config config.json --custom_vocab vocab.json
232
+ Graphic Interface:
233
+ ./ebook2audiobook.cmd
234
+ Linux/Mac:
235
+ headless:
236
+ ./ebook2audiobook.sh --headless --ebook 'path_to_ebook' --voice 'path_to_voice' --language en --use_custom_model --custom_model 'model.zip' --custom_config config.json --custom_vocab vocab.json
237
+ Graphic Interface:
238
+ ./ebook2audiobook.sh
239
+ ```
240
+
241
+
242
+ <details>
243
+ <summary>⚠️ Legacy-Depricated Old Use Instructions</summary>
244
+
245
+ ## 🚀 Usage
246
+
247
+ ## Legacy files have been moved to `ebook2audiobookXTTS/legacy/`
248
+
249
+ ### 🖥️ Gradio Web Interface
250
+
251
+ 1. **Run the Script**:
252
+ ```bash
253
+ python custom_model_ebook2audiobookXTTS_gradio.py
254
+ ```
255
+
256
+ 2. **Open the Web App**: Click the URL provided in the terminal to access the web app and convert eBooks.
257
+
258
+ ### 📝 Basic Usage
259
+
260
+ ```bash
261
+ python ebook2audiobook.py <path_to_ebook_file> [path_to_voice_file] [language_code]
262
+ ```
263
+
264
+ - **<path_to_ebook_file>**: Path to your eBook file.
265
+ - **[path_to_voice_file]**: Optional for voice cloning.
266
+ - **[language_code]**: Optional to specify language.
267
+
268
+ ### 🧩 Custom XTTS Model
269
+
270
+ ```bash
271
+ python custom_model_ebook2audiobookXTTS.py <ebook_file_path> <target_voice_file_path> <language> <custom_model_path> <custom_config_path> <custom_vocab_path>
272
+ ```
273
+
274
+ - **<ebook_file_path>**: Path to your eBook file.
275
+ - **<target_voice_file_path>**: Optional for voice cloning.
276
+ - **<language>**: Optional to specify language.
277
+ - **<custom_model_path>**: Path to `model.pth`.
278
+ - **<custom_config_path>**: Path to `config.json`.
279
+ - **<custom_vocab_path>**: Path to `vocab.json`.
280
+ </details>
281
+
282
+ ### 🐳 Using Docker
283
+
284
+ You can also use Docker to run the eBook to Audiobook converter. This method ensures consistency across different environments and simplifies setup.
285
+
286
+ #### 🚀 Running the Docker Container
287
+
288
+ To run the Docker container and start the Gradio interface, use the following command:
289
+
290
+ -Run with CPU only
291
+ ```powershell
292
+ docker run -it --rm -p 7860:7860 --platform=linux/amd64 athomasson2/ebook2audiobookxtts:huggingface python app.py
293
+ ```
294
+ -Run with GPU Speedup (Nvida graphics cards only)
295
+ ```powershell
296
+ docker run -it --rm --gpus all -p 7860:7860 --platform=linux/amd64 athomasson2/ebook2audiobookxtts:huggingface python app.py
297
+ ```
298
+
299
+ This command will start the Gradio interface on port 7860.(localhost:7860)
300
+ - For more options like running the docker in headless mode or making the gradio link public add the `-h` parameter after the `app.py` in the docker launch command
301
+ <details>
302
+ <summary><strong>Example of using docker in headless mode or modifying anything with the extra parameters + Full guide</strong></summary>
303
+
304
+ ## Example of using docker in headless mode
305
+
306
+ first for a docker pull of the latest with
307
+ ```bash
308
+ docker pull athomasson2/ebook2audiobookxtts:huggingface
309
+ ```
310
+
311
+ - Before you do run this you need to create a dir named "input-folder" in your current dir which will be linked, This is where you can put your input files for the docker image to see
312
+ ```bash
313
+ mkdir input-folder && mkdir Audiobooks
314
+ ```
315
+
316
+ - In the command below swap out **YOUR_INPUT_FILE.TXT** with the name of your input file
317
+
318
+ ```bash
319
+ docker run -it --rm \
320
+ -v $(pwd)/input-folder:/home/user/app/input_folder \
321
+ -v $(pwd)/Audiobooks:/home/user/app/Audiobooks \
322
+ --platform linux/amd64 \
323
+ athomasson2/ebook2audiobookxtts:huggingface \
324
+ python app.py --headless True --ebook /home/user/app/input_folder/YOUR_INPUT_FILE.TXT
325
+ ```
326
+
327
+ - And that should be it!
328
+
329
+ - The output Audiobooks will be found in the Audiobook folder which will also be located in your local dir you ran this docker command in
330
+
331
+
332
+ ## To get the help command for the other parameters this program has you can run this
333
+
334
+ ```bash
335
+ docker run -it --rm \
336
+ --platform linux/amd64 \
337
+ athomasson2/ebook2audiobookxtts:huggingface \
338
+ python app.py -h
339
+
340
+ ```
341
+
342
+
343
+ and that will output this
344
+
345
+ ```bash
346
+ user/app/ebook2audiobookXTTS/input-folder -v $(pwd)/Audiobooks:/home/user/app/ebook2audiobookXTTS/Audiobooks --memory="4g" --network none --platform linux/amd64 athomasson2/ebook2audiobookxtts:huggingface python app.py -h
347
+ starting...
348
+ usage: app.py [-h] [--share SHARE] [--headless HEADLESS] [--ebook EBOOK] [--voice VOICE]
349
+ [--language LANGUAGE] [--use_custom_model USE_CUSTOM_MODEL]
350
+ [--custom_model CUSTOM_MODEL] [--custom_config CUSTOM_CONFIG]
351
+ [--custom_vocab CUSTOM_VOCAB] [--custom_model_url CUSTOM_MODEL_URL]
352
+ [--temperature TEMPERATURE] [--length_penalty LENGTH_PENALTY]
353
+ [--repetition_penalty REPETITION_PENALTY] [--top_k TOP_K] [--top_p TOP_P]
354
+ [--speed SPEED] [--enable_text_splitting ENABLE_TEXT_SPLITTING]
355
+
356
+ Convert eBooks to Audiobooks using a Text-to-Speech model. You can either launch the
357
+ Gradio interface or run the script in headless mode for direct conversion.
358
+
359
+ options:
360
+ -h, --help show this help message and exit
361
+ --share SHARE Set to True to enable a public shareable Gradio link. Defaults
362
+ to False.
363
+ --headless HEADLESS Set to True to run in headless mode without the Gradio
364
+ interface. Defaults to False.
365
+ --ebook EBOOK Path to the ebook file for conversion. Required in headless
366
+ mode.
367
+ --voice VOICE Path to the target voice file for TTS. Optional, uses a default
368
+ voice if not provided.
369
+ --language LANGUAGE Language for the audiobook conversion. Options: en, es, fr, de,
370
+ it, pt, pl, tr, ru, nl, cs, ar, zh-cn, ja, hu, ko. Defaults to
371
+ English (en).
372
+ --use_custom_model USE_CUSTOM_MODEL
373
+ Set to True to use a custom TTS model. Defaults to False. Must
374
+ be True to use custom models, otherwise you'll get an error.
375
+ --custom_model CUSTOM_MODEL
376
+ Path to the custom model file (.pth). Required if using a custom
377
+ model.
378
+ --custom_config CUSTOM_CONFIG
379
+ Path to the custom config file (config.json). Required if using
380
+ a custom model.
381
+ --custom_vocab CUSTOM_VOCAB
382
+ Path to the custom vocab file (vocab.json). Required if using a
383
+ custom model.
384
+ --custom_model_url CUSTOM_MODEL_URL
385
+ URL to download the custom model as a zip file. Optional, but
386
+ will be used if provided. Examples include David Attenborough's
387
+ model: 'https://huggingface.co/drewThomasson/xtts_David_Attenbor
388
+ ough_fine_tune/resolve/main/Finished_model_files.zip?download=tr
389
+ ue'. More XTTS fine-tunes can be found on my Hugging Face at
390
+ 'https://huggingface.co/drewThomasson'.
391
+ --temperature TEMPERATURE
392
+ Temperature for the model. Defaults to 0.65. Higher Tempatures
393
+ will lead to more creative outputs IE: more Hallucinations.
394
+ Lower Tempatures will be more monotone outputs IE: less
395
+ Hallucinations.
396
+ --length_penalty LENGTH_PENALTY
397
+ A length penalty applied to the autoregressive decoder. Defaults
398
+ to 1.0. Not applied to custom models.
399
+ --repetition_penalty REPETITION_PENALTY
400
+ A penalty that prevents the autoregressive decoder from
401
+ repeating itself. Defaults to 2.0.
402
+ --top_k TOP_K Top-k sampling. Lower values mean more likely outputs and
403
+ increased audio generation speed. Defaults to 50.
404
+ --top_p TOP_P Top-p sampling. Lower values mean more likely outputs and
405
+ increased audio generation speed. Defaults to 0.8.
406
+ --speed SPEED Speed factor for the speech generation. IE: How fast the
407
+ Narrerator will speak. Defaults to 1.0.
408
+ --enable_text_splitting ENABLE_TEXT_SPLITTING
409
+ Enable splitting text into sentences. Defaults to True.
410
+
411
+ Example: python script.py --headless --ebook path_to_ebook --voice path_to_voice
412
+ --language en --use_custom_model True --custom_model model.pth --custom_config
413
+ config.json --custom_vocab vocab.json
414
+ ```
415
+ </details>
416
+
417
+ #### 🖥️ Docker GUI
418
+ ![demo_web_gui](https://github.com/user-attachments/assets/85af88a7-05dd-4a29-91de-76a14cf5ef06)
419
+
420
+ <details>
421
+ <summary>Click to see images of Web GUI</summary>
422
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/b36c71cf-8e06-484c-a252-934e6b1d0c2f">
423
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/c0dab57a-d2d4-4658-bff9-3842ec90cb40">
424
+ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/0a99eeac-c521-4b21-8656-e064c1adc528">
425
+ </details>
426
+ ### 🛠️ For Custom Xtts Models
427
+
428
+ Models built to be better at a specific voice. Check out my Hugging Face page [here](https://huggingface.co/drewThomasson).
429
+
430
+ To use a custom model, paste the link of the `Finished_model_files.zip` file like this:
431
+
432
+ [David Attenborough fine tuned Finished_model_files.zip](https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/resolve/main/Finished_model_files.zip?download=true)
433
+
434
+ For a custom model a ref audio clip of the voice will also be needed:
435
+ [ref audio clip of David Attenborough](https://huggingface.co/drewThomasson/xtts_David_Attenborough_fine_tune/blob/main/ref.wav)
436
+
437
+
438
+
439
+ More details can be found at the [Dockerfile Hub Page]([https://github.com/DrewThomasson/ebook2audiobookXTTS](https://hub.docker.com/repository/docker/athomasson2/ebook2audiobookxtts/general)).
440
+
441
+ ## 🌐 Fine Tuned Xtts models
442
+
443
+ To find already fine-tuned XTTS models, visit [this Hugging Face link](https://huggingface.co/drewThomasson) 🌐. Search for models that include "xtts fine tune" in their names.
444
+
445
+ ## 🎥 Demos
446
+
447
+ Rainy day voice
448
+
449
+ https://github.com/user-attachments/assets/8486603c-38b1-43ce-9639-73757dfb1031
450
+
451
+ David Attenborough voice
452
+
453
+ https://github.com/user-attachments/assets/47c846a7-9e51-4eb9-844a-7460402a20a8
454
+
455
+
456
+ ## 🤗 [Huggingface space demo](https://huggingface.co/spaces/drewThomasson/ebook2audiobookXTTS)
457
+ - Huggingface space is running on free cpu tier so expect very slow or timeout lol, just don't give it giant files is all
458
+ - Best to duplicate space or run locally.
459
+
460
+ ## Free Google Colab [![Free Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DrewThomasson/ebook2audiobookXTTS/blob/main/Notebooks/colab_ebook2audiobookxtts.ipynb)
461
+
462
+
463
+
464
+ ## 📚 Supported eBook Formats
465
+
466
+ - `.epub`, `.pdf`, `.mobi`, `.txt`, `.html`, `.rtf`, `.chm`, `.lit`, `.pdb`, `.fb2`, `.odt`, `.cbr`, `.cbz`, `.prc`, `.lrf`, `.pml`, `.snb`, `.cbc`, `.rb`, `.tcr`
467
+ - **Best results**: `.epub` or `.mobi` for automatic chapter detection
468
+
469
+ ## 📂 Output
470
+
471
+ - Creates an `.m4b` file with metadata and chapters.
472
+ - **Example Output**: ![Example](https://github.com/DrewThomasson/VoxNovel/blob/dc5197dff97252fa44c391dc0596902d71278a88/readme_files/example_in_app.jpeg)
473
+
474
+ ## 🛠️ Common Issues:
475
+ - "It's slow!" - On CPU only this is very slow, and you can only get speedups though a NVIDIA GPU. [Discussion about this](https://github.com/DrewThomasson/ebook2audiobookXTTS/discussions/19#discussioncomment-10879846) For faster multilingual generation I would suggest my other [project that uses piper-tts](https://github.com/DrewThomasson/ebook2audiobookpiper-tts) instead(It doesn't have zero-shot voice cloning though, and is siri quality voices, but it is much faster on cpu.)
476
+ - "I'm having dependency issues" - Just use the docker, its fully self contained and has a headless mode, add `-h` parameter after the `app.py` in the docker run command for more information.
477
+ - "Im getting a truncated audio issue!" - PLEASE MAKE AN ISSUE OF THIS, I don't speak every language and I need advise from each person to fine tune my sentense splitting function on any other languages.😊
478
+ - "The loading bar is stuck at 30% in the web gui!" - The web gui loading bar is extreamly basic as its just split between the three loading steps, refer to the terminal and what sentense it's on for a more accurate gauge on where is it progress wise.
479
+
480
+ ## What I need help with! 🙌
481
+ ## [Full list of things can be found here](https://github.com/DrewThomasson/ebook2audiobookXTTS/issues/32)
482
+ - Any help from people speaking any of the supported langues to help with proper sentence splitting methods
483
+ - Potentially creating readme Guides for Multiple languages(Becuase the only language I know is English 😔)
484
+
485
+ ## 🙏 Special Thanks
486
+
487
+ - **Coqui TTS**: [Coqui TTS GitHub](https://github.com/coqui-ai/TTS)
488
+ - **Calibre**: [Calibre Website](https://calibre-ebook.com)
489
+
490
+ - [@shakenbake15 for better chapter saving method](https://github.com/DrewThomasson/ebook2audiobookXTTS/issues/8)
491
+
ebook2audiobook.egg-info/SOURCES.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ ebook2audiobookXTTS.egg-info/PKG-INFO
6
+ ebook2audiobookXTTS.egg-info/SOURCES.txt
7
+ ebook2audiobookXTTS.egg-info/dependency_links.txt
8
+ ebook2audiobookXTTS.egg-info/entry_points.txt
9
+ ebook2audiobookXTTS.egg-info/requires.txt
10
+ ebook2audiobookXTTS.egg-info/top_level.txt
ebook2audiobook.egg-info/assets/David_Attenborough_voice_Demo.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:251d55a3913d7b0521ad800ad21d836d8d90646e56e91f1aae94b7ee54b7a294
3
+ size 4358256
ebook2audiobook.egg-info/assets/Google Colab Restart Runtime pic.png ADDED

Git LFS Details

  • SHA256: 18f53b3054bdb6c922745d2d1a7ef80d63bbad4fbcb297b0eb80640bb6f958a0
  • Pointer size: 131 Bytes
  • Size of remote file: 165 kB
ebook2audiobook.egg-info/assets/Rainy_Day_voice_Demo.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c4d5eb612cb397ca9ee743c3025871499a183788ca21d5e1945f4641cd393ca
3
+ size 2967547
ebook2audiobook.egg-info/assets/demo_web_gui.gif ADDED

Git LFS Details

  • SHA256: c5fd21643cf3e112a6460ffd5e1a688bd003a16227e242c7502c34aa08fe779d
  • Pointer size: 133 Bytes
  • Size of remote file: 15.5 MB
ebook2audiobook.egg-info/assets/gui_1.png ADDED

Git LFS Details

  • SHA256: f4797f9637da9566b233c834782a302ba48aea609d50bd08afcc369bf9b113ba
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
ebook2audiobook.egg-info/assets/gui_2.png ADDED

Git LFS Details

  • SHA256: b3437cfe8cf80b1a5958b0fd66f7ca9a31cb7829dcf835b771fb3a8572aadefd
  • Pointer size: 131 Bytes
  • Size of remote file: 411 kB
ebook2audiobook.egg-info/assets/gui_3.png ADDED

Git LFS Details

  • SHA256: af8d450d24d65180be89dc575487b84ce01c57dfd69d21fe40e7d18f70e4f5be
  • Pointer size: 131 Bytes
  • Size of remote file: 164 kB
ebook2audiobook.egg-info/audiobooks/cli/.gitkeep ADDED
File without changes
ebook2audiobook.egg-info/audiobooks/gui/gradio/.gitkeep ADDED
File without changes
ebook2audiobook.egg-info/audiobooks/gui/host/.gitkeep ADDED
File without changes
ebook2audiobook.egg-info/dependency_links.txt ADDED
@@ -0,0 +1 @@
 
 
1
+
ebook2audiobook.egg-info/dockerfiles/HuggingfaceDockerfile ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ # Build with the command:
5
+ # docker build --platform linux/amd64 -t athomasson2/ebook2audiobook:latest .
6
+
7
+ FROM python:3.12
8
+
9
+ # Create and switch to a non-root user
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV PATH="/home/user/.local/bin:$PATH"
13
+
14
+ # Set a working directory for temporary operations
15
+ WORKDIR /app
16
+
17
+ # Install system packages
18
+ USER root
19
+ RUN apt-get update && \
20
+ apt-get install -y wget git calibre ffmpeg libmecab-dev mecab mecab-ipadic-utf8 curl espeak-ng sox libsndfile1-dev libc-dev && \
21
+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
22
+ apt-get install -y nodejs && \
23
+ apt-get clean && \
24
+ rm -rf /var/lib/apt/lists/*
25
+
26
+
27
+
28
+ # Clone the GitHub repository and set it as the working directory
29
+ USER root
30
+ RUN apt-get update && apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/*
31
+ USER user
32
+ RUN git clone --depth 1 https://github.com/DrewThomasson/ebook2audiobook.git /home/user/app && rm -rf /home/user/app/.git
33
+
34
+
35
+ # Set the cloned repository as the base working directory
36
+ WORKDIR /home/user/app
37
+
38
+ # Install Python dependencies
39
+ # Install UniDic and its dependencies
40
+ RUN pip install --no-cache-dir unidic-lite unidic
41
+ RUN python3 -m unidic download # Download UniDic
42
+ RUN mkdir -p /home/user/.local/share/unidic && \
43
+ mv ~/.local/share/unidic/* /home/user/.local/share/unidic/ || true
44
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
45
+
46
+ # Set environment variable to ensure MeCab can locate UniDic
47
+ ENV UNIDIC_DIR=/home/user/.local/share/unidic
48
+
49
+ # Do a test run to make sure that the base models are pre-downloaded and baked into the image
50
+ #RUN echo "This is a test sentence." > test.txt
51
+ #RUN python app.py --headless --ebook test.txt --script_mode full_docker
52
+ #RUN rm test.txt
53
+
54
+ # Expose the required port
55
+ EXPOSE 7860
56
+
57
+ # Start the Gradio app with the required flag
58
+ ENTRYPOINT ["python", "app.py", "--script_mode", "full_docker"]
ebook2audiobook.egg-info/dockerfiles/UbuntuCudaDockerfile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official CUDA base image
2
+ FROM nvidia/cuda:11.8.0-base-ubuntu22.04
3
+
4
+ # Set up environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV PYTHONUNBUFFERED=1
7
+ ENV PATH="/opt/conda/bin:$PATH"
8
+
9
+ # Install system packages and Miniconda
10
+ RUN apt-get update && apt-get install -y \
11
+ wget git calibre ffmpeg libmecab-dev mecab mecab-ipadic \
12
+ && apt-get clean && rm -rf /var/lib/apt/lists/* && \
13
+ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
14
+ bash miniconda.sh -b -p /opt/conda && \
15
+ rm miniconda.sh && \
16
+ /opt/conda/bin/conda clean --all --yes
17
+
18
+ # Create and activate the Python 3.12 environment
19
+ RUN conda create -y -n py312 python=3.12 && \
20
+ conda clean -a
21
+
22
+ # Create and switch to a non-root user
23
+ RUN useradd -m -u 1000 user
24
+ USER user
25
+
26
+ # Activate the Conda environment
27
+ SHELL ["conda", "run", "-n", "py312", "/bin/bash", "-c"]
28
+
29
+ # Clone the GitHub repository
30
+ RUN git clone https://github.com/DrewThomasson/ebook2audiobook.git /home/user/app
31
+
32
+ # Set the working directory
33
+ WORKDIR /home/user/app
34
+
35
+ # Install Python dependencies using requirements.txt
36
+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
37
+ pip install --no-cache-dir -r requirements.txt
38
+
39
+ # Expose the application port
40
+ EXPOSE 7860
41
+
42
+ # Start the Gradio app
43
+ CMD ["conda", "run", "-n", "py312", "python", "app.py"]
ebook2audiobook.egg-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [console_scripts]
2
+ ebook2audiobook = app:main
ebook2audiobook.egg-info/requires.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ argostranslate
2
+ beautifulsoup4
3
+ cutlet
4
+ deep_translator
5
+ demucs
6
+ docker
7
+ ebooklib
8
+ fastapi
9
+ fugashi
10
+ gradio>=5.42.0
11
+ hangul-romanize
12
+ indic-nlp-library
13
+ iso-639
14
+ jieba
15
+ soynlp
16
+ pythainlp
17
+ mutagen
18
+ nvidia-ml-py
19
+ phonemizer-fork
20
+ pydub
21
+ pyannote-audio
22
+ PyOpenGL
23
+ pypinyin
24
+ ray
25
+ regex
26
+ translate
27
+ tqdm
28
+ unidic
29
+ pymupdf4llm
30
+ sudachipy
31
+ sudachidict_core
32
+ transformers==4.53.2
33
+ coqui-tts[languages]==0.27.0
34
+ torchvggish
ebook2audiobook.egg-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+