Spaces:
Running
Running
drewThomasson
commited on
Commit
•
48ae26b
1
Parent(s):
d0b5fe7
Update ebook2audiobookXTTS/ebook2audiobook.py
Browse files
ebook2audiobookXTTS/ebook2audiobook.py
CHANGED
@@ -10,7 +10,10 @@ from pydub import AudioSegment
|
|
10 |
import os
|
11 |
import nltk
|
12 |
from nltk.tokenize import sent_tokenize
|
13 |
-
|
|
|
|
|
|
|
14 |
def is_folder_empty(folder_path):
|
15 |
if os.path.exists(folder_path) and os.path.isdir(folder_path):
|
16 |
# List directory contents
|
@@ -223,7 +226,7 @@ def create_chapter_labeled_book(ebook_file_path):
|
|
223 |
save_chapters_as_text(output_epub)
|
224 |
|
225 |
# Download the necessary NLTK data (if not already present)
|
226 |
-
nltk.download('punkt')
|
227 |
|
228 |
def process_chapter_files(folder_path, output_csv):
|
229 |
with open(output_csv, 'w', newline='', encoding='utf-8') as csvfile:
|
|
|
10 |
import os
|
11 |
import nltk
|
12 |
from nltk.tokenize import sent_tokenize
|
13 |
+
|
14 |
+
from .. import import_all_files
|
15 |
+
|
16 |
+
#nltk.download('punkt') # Make sure to download the necessary models
|
17 |
def is_folder_empty(folder_path):
|
18 |
if os.path.exists(folder_path) and os.path.isdir(folder_path):
|
19 |
# List directory contents
|
|
|
226 |
save_chapters_as_text(output_epub)
|
227 |
|
228 |
# Download the necessary NLTK data (if not already present)
|
229 |
+
#nltk.download('punkt')
|
230 |
|
231 |
def process_chapter_files(folder_path, output_csv):
|
232 |
with open(output_csv, 'w', newline='', encoding='utf-8') as csvfile:
|