Skip to content

Commit

Permalink
0.4.3 prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
CheshireCC committed Nov 11, 2023
1 parent 7f0bb3f commit f0439d4
Show file tree
Hide file tree
Showing 39 changed files with 129,630 additions and 2,533 deletions.
Binary file added README.assets/image-20231111131301664.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- convert online OpenAI-whisper-models to ct2 format
- provide all paraments of VAD-model and whisper-model
- now, it support whisperX
- Demucs model support
- whisper large-v3 model support

---

Expand All @@ -22,9 +24,14 @@

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

- ### Large-v3 模型支持

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

- ### Demucs AVE

![DemucsFunction](./README.assets/DemucsFunction.png)

- ### batch process

![image-20231008150849827](./README.assets/image-20231008150849827.png)
Expand Down
742 changes: 501 additions & 241 deletions en.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fasterWhisperGUIConfig.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"use_auth_token": "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", "overlap": 0.1, "segment": 10.0}
{"use_auth_token": "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", "overlap": 0.1, "segment": 7.8}
33 changes: 24 additions & 9 deletions faster_whisper_GUI/UI_MainWindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# from pathlib import Path

from PySide6.QtCore import (
Qt
, QCoreApplication
# Qt,
QCoreApplication
)

from PySide6.QtWidgets import (
QSpacerItem
, QWidget
# QSpacerItem,
QWidget
, QStackedWidget
, QVBoxLayout
, QHBoxLayout
Expand All @@ -22,16 +22,18 @@
from PySide6.QtGui import QIcon

from qfluentwidgets import (
NavigationAvatarWidget,
NavigationInterface
, setTheme
, Theme
, FluentIcon
)
from qfluentwidgets.components.navigation.navigation_panel import NavigationItemPosition

from qframelesswindow import (
FramelessMainWindow
, StandardTitleBar
)
# from qframelesswindow import (
# FramelessMainWindow
# , StandardTitleBar
# )

from .config import (Language_dict
, Preciese_list
Expand All @@ -57,6 +59,7 @@
from .outputPageNavigationInterface import OutputPageNavigationInterface
from .homePageNavigationInterface import HomePageNavigationinterface
from .demucsPageNavigationInterface import DemucsPageNavigation
from .aboutPageNavigationInterface import AboutPageNavigationInterface

from .fasterWhisperGuiIcon import FasterWhisperGUIIcon

Expand Down Expand Up @@ -120,7 +123,7 @@ def initWin(self):
StyleSheet.MAIN_WINDOWS.apply(self)

# self.resize(800, 500)
self.setGeometry(500, 200, 1147, 825)
self.setGeometry(500, 200, 1250, 825)

# 添加标题栏
# self.setTitleBar(StandardTitleBar(self))
Expand Down Expand Up @@ -207,6 +210,18 @@ def setupUI(self):
self.addSubInterface(self.page_output, "pageOutput", self.tr("后处理及输出"), icon=FluentIcon.SAVE_AS)
self.pages.append(self.page_output)

self.page_About = AboutPageNavigationInterface(self)
self.page_About.setObjectName("pageAbout")
self.stackedWidget.addWidget(self.page_About)

self.navigationAvatarWidget = NavigationAvatarWidget('', ':/resource/Image/killua.png')
self.pivot.addWidget(
routeKey='avatar',
widget=self.navigationAvatarWidget,
onClick=lambda: self.stackedWidget.setCurrentWidget(self.page_About),
position=NavigationItemPosition.BOTTOM
)

self.stackedWidget.currentChanged.connect(self.onCurrentIndexChanged)
# self.stackedWidget.setCurrentIndex(0)
self.stackedWidget.setCurrentWidget(self.page_home)
Expand Down
128 changes: 128 additions & 0 deletions faster_whisper_GUI/aboutPageNavigationInterface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@

from PySide6.QtCore import Qt
from PySide6.QtGui import QBrush, QFont, QPainter, QPixmap
from PySide6.QtWidgets import QFrame, QSizePolicy, QVBoxLayout, QWidget, QGraphicsView, QGraphicsScene
from qfluentwidgets import DisplayLabel, ScrollArea, TitleLabel, HorizontalSeparator

from .style_sheet import StyleSheet

class ImageViewer(QGraphicsView):
def __init__(self, parent=None, image=None):
super().__init__(parent)
self.setScene(QGraphicsScene(self))
self.setRenderHint(QPainter.Antialiasing)
# self.setDragMode(QGraphicsView.ScrollHandDrag)
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
self.setResizeAnchor(QGraphicsView.AnchorUnderMouse)
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setBackgroundBrush(QBrush(Qt.GlobalColor.transparent))
self.setFrameShape(QFrame.NoFrame)
# self.setInteractive(True)
# self.setFixedHeight(430)
# self.setFixedWidth(1160)

self.pixmap = QPixmap(image)
self.pixmap_item = self.scene().addPixmap(self.pixmap)

# self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)

self.fitInView(self.pixmap_item, Qt.AspectRatioMode.KeepAspectRatio)
# self.setFixedHeight(self.width() * self.scaler)
# self.setSceneRect(0, 0, self.width(), self.height())

self.scaler = self.height() / self.width()

self.setMinimumHeight(362)
self.setMinimumWidth(885)


def resizeEvent(self, event):
# self.setSceneRect(0, 0, self.width(), self.height())

self.fitInView(self.pixmap_item, Qt.AspectRatioMode.KeepAspectRatio)
self.setFixedHeight(self.width() * self.scaler)
# self.setSceneRect(0, 0, self.width(), self.height())

# print(self.pixmap.width(), self.pixmap.height())
# print(self.width(), self.height())
# print(self.sceneRect())

class AboutPageNavigationInterface(ScrollArea):
def __init__(self, parent = None) -> None:
super().__init__(parent)

# 主控件
self.mainWidget= QWidget(self)
self.mainWidget.setObjectName("mainObject")
# self.mainLayout.addWidget(self.mainWidget, 0, 0, 1, 1)

# 主控件布局
self.mainVLayout = QVBoxLayout(self.mainWidget)
self.mainWidget.setLayout(self.mainVLayout)
self.mainVLayout.setAlignment(Qt.AlignmentFlag.AlignTop)

self.mainVLayout.setSpacing(10)

self.setViewportMargins(0, 0, 0, 0)
self.setWidget(self.mainWidget)
self.setWidgetResizable(True)

self.lisence = self.tr("""
使用本软件即代表您已阅读并同意以下用户协议:
· 您同意在遵守您所在国家或地区的法律法规的前提下使用此软件。
· 您不得实施包括但不限于以下行为,也不得为任何违反法律法规的行为提供便利:
- 反对宪法所规定的基本原则的。
- 危害国家安全、泄露国家秘密、颠覆国家政权,破坏国家统一的。
- 损害国家荣誉和利益的。
- 煽动民族仇恨、民族歧视,破坏民族团结的。
- 破坏国家宗教政策,宣扬邪教和封建迷信的。
- 散布谣言,扰乱社会秩序,破坏社会稳定的。
- 散布淫秽色情、赌博、暴力、凶杀、恐怖主义或教唆犯罪的。
- 侮辱或诽谤他人,侵害他人合法权益的。
- 含有法律、行政法规禁止的其他内容的。
· 因您的数据的产生、收集、处理、使用等任何相关事项存在违反法律法规等情况而造成的全部后果及责任均由您自行承担。
""")

self.setupUI()

StyleSheet.ABOUTPAGEINTERFACE.apply(self)


def setupUI(self):

image = r":/resource/Image/pexels-photo-1563356.jpeg"

self.imagelabel= ImageViewer(self, image)
self.addWidget(self.imagelabel)
self.imagelabel.setObjectName("imageViewer")

self.mainVLayout.addSpacing(15)
self.mainVLayout.addWidget(HorizontalSeparator(self))


self.strongBodyLabel = TitleLabel(self)
self.strongBodyLabel.setText(self.tr("协议"))
self.strongBodyLabel.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.addWidget(self.strongBodyLabel)

# self.tblabel = DisplayLabel()
# self.tblabel.setText(self.tr('"向收到该信息的世界致以最美好的祝愿!"'))
# self.tblabel.setFont(QFont("Microsoft YaHei", 13))
# self.tblabel.setAlignment(Qt.AlignCenter)
# self.addWidget(self.tblabel)


self.lisenceLabel = DisplayLabel()
self.lisenceLabel.setText(self.lisence)
self.lisenceLabel.setScaledContents(True)
self.lisenceLabel.setFont(QFont("Microsoft YaHei", 13))
self.addWidget(self.lisenceLabel)

self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)

def addWidget(self, widget):
self.mainVLayout.addWidget(widget)

def addLayout(self, layout):
self.mainVLayout.addLayout(layout)
3 changes: 2 additions & 1 deletion faster_whisper_GUI/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"ba": "bashkir",
"jw": "javanese",
"su": "sundanese",
"yue": "cantonese"
}

Preciese_list = ['int8',
Expand All @@ -111,7 +112,7 @@
]

Model_names = ["tiny", "tiny.en", "base", "base.en", "small",
"small.en", "medium", "medium.en", "large-v1", "large-v2"]
"small.en", "medium", "medium.en", "large-v1", "large-v2","large-v3"]

Device_list = ["cpu", "cuda", "auto"]
Task_list = ["transcribe" , "translate"]
Expand Down
Loading

0 comments on commit f0439d4

Please sign in to comment.