Skip to content

Commit

Permalink
0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CheshireCC committed Nov 18, 2023
1 parent 2cf5737 commit 1b5d4d0
Show file tree
Hide file tree
Showing 46 changed files with 4,391 additions and 3,027 deletions.
73 changes: 44 additions & 29 deletions FasterWhisperGUI.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
# coding:utf-8


import datetime
import sys

# # 将默认的递归深度修改为3000
# sys.setrecursionlimit(7000)
from faster_whisper_GUI.version import __version__
from faster_whisper_GUI.util import outputWithDateTime

# print输出重定向到文件
log_f = open('fasterwhispergui.log', 'w', buffering=1)
log_f.write(f"\nfaster_whisper_GUI: {__version__}")

sys.stdout = log_f
sys.stderr = log_f

RunDateTime = datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
print(f"=========={RunDateTime}==========")
outputWithDateTime("Start")

import logging

# faster_whisper 模块日志
logger_faster_whisper = logging.getLogger("faster_whisper")
logger_faster_whisper.setLevel(logging.DEBUG)
faster_whisper_logger_handler = logging.FileHandler(r"./faster_whisper.log", mode="w")
faster_whisper_logger_handler.setLevel(logging.DEBUG)
formatter1 = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s",datefmt='%Y-%m-%d_%H:%M:%S')
faster_whisper_logger_handler.setFormatter(formatter1)
logger_faster_whisper.addHandler(faster_whisper_logger_handler)

# pyside6 日志
# logger_pyside = logging.getLogger("faster_whisper_GUI")
# logger_pyside.setLevel(logging.DEBUG)
# pyside_logger_handler = logging.FileHandler(r"./pyside.log", mode="w")
# pyside_logger_handler.setLevel(logging.DEBUG)
# formatter2 = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s",datefmt='%Y-%m-%d_%H:%M:%S')
# pyside_logger_handler.setFormatter(formatter2)
# logger_pyside.addHandler(pyside_logger_handler)

# # 将默认的递归深度修改为3000
# sys.setrecursionlimit(7000)

from PySide6.QtCore import Qt
from PySide6.QtGui import QFont, QPixmap
from PySide6.QtWidgets import QApplication, QSplashScreen, QVBoxLayout
from PySide6.QtGui import (QFont, QPixmap)
from PySide6.QtWidgets import (QApplication, QSplashScreen, QVBoxLayout)

from qfluentwidgets import ProgressBar

Expand Down Expand Up @@ -45,7 +66,7 @@ def mousePressEvent(self, event):
splash.setFont(QFont('Segoe UI', 15))

#初始文本
splash.showMessage("Loadding...", Qt.AlignmentFlag.AlignCenter | Qt.AlignmentFlag.AlignBottom, Qt.white)
splash.showMessage("Loading...", Qt.AlignmentFlag.AlignCenter | Qt.AlignmentFlag.AlignBottom, Qt.white)

# splash.setStyleSheet("MySplashScreen{border-radius: 10px;}")

Expand All @@ -67,8 +88,6 @@ def mousePressEvent(self, event):
# app.processEvents() # 处理主进程事件

import os
import locale
# from threading import Thread
pb.setValue(10)

# splash.showMessage("import translator...") # , Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter, Qt.white)
Expand All @@ -82,7 +101,7 @@ def mousePressEvent(self, event):
pb.setValue(60)

from resource import rc_Translater

from faster_whisper_GUI.translator import TRANSLATOR, language

# 主程序入口
if __name__ == "__main__":
Expand Down Expand Up @@ -112,31 +131,27 @@ def mousePressEvent(self, event):
pb.setValue(65)

# 获取当前计算机语言
language_localtion, _ = locale.getdefaultlocale()
language = language_localtion.split("_")[0]
print(f"language: {language_localtion}")
# language_localtion, _ = locale.getdefaultlocale()
# language = language_localtion.split("_")[0]
# print(f"language: {language_localtion}")

# splash.showMessage("set Language...")# , Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter, Qt.white)
# 非中文时加载语言翻译文件, 设置英文界面
if language != "zh" :
splash.showMessage(
"Install translator...",
Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter,
Qt.white
)

translator = QTranslator(app)
if translator.load(":/resource/Translater/en.qm"):
# splash.showMessage("set Language: English") #, Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter, Qt.white)
app.installTranslator(translator)
translator = TRANSLATOR
splash.showMessage(
"Install translator...",
Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter,
Qt.white
)

app.installTranslator(translator)

pb.setValue(70)
sys.stderr = sys.__stderr__
log_f.close()

# splash.showMessage("Load Windows...") #, Qt.AlignmentFlag.AlignBottom | Qt.AlignmentFlag.AlignHCenter, Qt.white)

mainWindows = MainWindows()
mainWindows = MainWindows(translator=translator)
pb.setValue(100)

# splash.requestInterruption()
Expand Down
Binary file added README.assets/image-20231118155123131.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README.assets/image-20231118155209847.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README.assets/image-20231118155300816.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@

- ### Links

[pyside6-fluent-widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)
- [pyside6-fluent-widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets)

[faster-whisper](https://github.com/guillaumekln/faster-whisper)
- [faster-whisper](https://github.com/guillaumekln/faster-whisper)

[whisperX](https://github.com/m-bain/whisperX)
- [whisperX](https://github.com/m-bain/whisperX)

[HuggingFace models download](https://huggingface.co/models)
- [HuggingFace models download](https://huggingface.co/models)

[Demucs](https://github.com/facebookresearch/demucs)
- [Demucs](https://github.com/facebookresearch/demucs)


- more and better AVE :

- [UVR](https://github.com/Anjok07/ultimatevocalremovergui#installation)

- [Demucs-Gui](https://github.com/CarlGao4/Demucs-Gui)


- ## What's this

Expand Down Expand Up @@ -74,13 +80,11 @@

- ### Load Model / Download Model / Convert Model

![0.2.7-2](./README.assets/0.2.7-2.png)

![软件使用-模型参数](./README.assets/软件使用-模型参数.png)
![image-20231118155123131](./README.assets/image-20231118155123131.png)

- ### Large-v3 模型支持

![image-20231111131301664](./README.assets/image-20231111131301664.png)
![image-20231118155209847](./README.assets/image-20231118155209847.png)

- ### Demucs AVE

Expand Down Expand Up @@ -108,9 +112,9 @@

![image-20231113020407272](./README.assets/image-20231113020407272.png)

- ### process a video file
- ### setting

![转写执行效果](./README.assets/转写执行效果.png)
![image-20231118155300816](./README.assets/image-20231118155300816.png)

- ### Show result and edit timestample

Expand Down
1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import whisperx
import faster_whisper_GUI

2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"QFluentWidgets": {
"ThemeColor": "#ff009faa",
"ThemeMode": "Light"
"ThemeMode": "Dark"
}
}
Loading

0 comments on commit 1b5d4d0

Please sign in to comment.