AlexandaJerry / whisper-vits-japanese

Vits Japanese with Whisper as data processor (you can train your VITS even you only have audios)
MIT License
160 stars 28 forks source link

运行auto.py时候,没有任何报错,但是filelists中的两个txt都没有写入文本 #5

Closed misaka10843 closed 1 year ago

misaka10843 commented 1 year ago
$ python auto.py

Folder ./srt_files/ exists.. continuing processing..
Folder ./audio/ exists.. continuing processing..
Encoding srt_file(s) to utf8...
Encoding of 6-file(s) changed
---------------------------------------------------------------------
Extracting information from srt_file(s) to csv_files
6-file(s) converted and saved as csv-files to ./csv
---------------------------------------------------------------------
Downsampling wav files...
File  1  completed: 1
File  2  completed: 2
File  3  completed: 3
File  4  completed: 4
File  5  completed: 5
File  6  completed: 6
Downsampling complete
---------------------------------------------------------------------
The script took  141.88347029685974  seconds to run
Pre-processing of audio files is complete.
---------------------------------------------------------------------
Slicing audio according to start- and end_times of transcript_csvs...
Slicing complete. 750 files in dir "sliced_audio"
---------------------------------------------------------------------
Extracting filepath and -size for every .wav file in ./sliced_audio
DS_csv with Filenames - and sizes created.
---------------------------------------------------------------------
Merging csv-files with transcriptions
All csv-files merged
Merged csv with all transcriptions created.
---------------------------------------------------------------------
Final DS csv generated.
---------------------------------------------------------------------
Length of ds_final: 0
Final Files cleaned of unwanted characters
Unwanted characters cleaned.
---------------------------------------------------------------------
The script took 0:02:27.191640 to run
********************************************************************************************************

其中,sliced_audio中已经生成了音频切片

但是在项目目录中并未生成下方的两个csv文件夹

merged_csv_files = './merged_csv'
final_csv_path = './final_csv'

请问如何解决这种问题qwq

(OS:Windows11,python环境已经尽量还原Google colab中的环境)

AlexandaJerry commented 1 year ago

你好,创建文件夹的命令是在util文件夹下的creating_directory.py文件夹下, merged_csv_files = './merged_csv'

if not os.path.exists(merged_csv_files):
    try:
        os.mkdir(merged_csv_files)
    except OSError:
        print('Creation of directory %s failed' %merged_csv_files)

final_csv_files = './final_csv'

if not os.path.exists(final_csv_files):
    try:
        os.mkdir(final_csv_files)
    except OSError:
        print('Creation of directory %s failed' %final_csv_files)
misaka10843 commented 1 year ago

你好,创建文件夹的命令是在util文件夹下的creating_directory.py文件夹下, merged_csv_files = './merged_csv'

if not os.path.exists(merged_csv_files):
    try:
        os.mkdir(merged_csv_files)
    except OSError:
        print('Creation of directory %s failed' %merged_csv_files)

final_csv_files = './final_csv'

if not os.path.exists(final_csv_files):
    try:
        os.mkdir(final_csv_files)
    except OSError:
        print('Creation of directory %s failed' %final_csv_files)

不知道为什么,在Windows上一直都不能创建csv文件夹,现在只能用Linux(colab)生成后再复制到Windows上🤣

可能是因为某些玄学问题导致Windows无法创建吧🤣

AlexandaJerry commented 1 year ago

可以自己试着创建一下这俩文件夹,然后在调试过程中可以先注释掉auto.py中的141-163行,这样就能看到处理过程中的中间文件了。auto.py里其实很多命令都是重复和多余操作,我其实是直接摘抄的srt-to-audio-split项目的代码,所以中间文件没什么用我用这20行命令删掉了,注释掉后会保留下处理过程中的文件。

import shutil,os,re slice_path = './ready_for_slice' merged_csv_files = './merged_csv' final_csv_path = './final_csv'

shutil.rmtree(slice_path)

if os.path.exists(slice_path): try: shutil.rmtree(slice_path) except: skip

if os.path.exists(final_csv_path): try: shutil.rmtree(final_csv_path) except: skip if os.path.exists(merged_csv_files): try: shutil.rmtree(merged_csv_files) except: skip

AlexandaJerry commented 1 year ago

有趣哈哈 感觉很多Colab项目到本地后都运转不起来

misaka10843 commented 1 year ago

有趣哈哈 感觉很多Colab项目到本地后都运转不起来

只能说真的挺玄学🤣

AlexandaJerry commented 1 year ago

话说会不会可能是斜杠的问题,window路径一般使用.\\还是.//这种来着,我记得得用双下划线,所以可能这俩文件的linux路径没法创建出文件夹来