mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Add more supported file format type (#194)
This commit is contained in:
parent
f358809043
commit
2804159981
2 changed files with 6 additions and 5 deletions
10
buzz/gui.py
10
buzz/gui.py
|
|
@ -9,8 +9,8 @@ from typing import Any, Dict, List, Optional, Tuple
|
|||
import humanize
|
||||
import sounddevice
|
||||
from PyQt6 import QtGui
|
||||
from PyQt6.QtCore import (QDateTime, QObject, QRect, QSettings, Qt, QTimer,
|
||||
QUrl, pyqtSignal, QThreadPool)
|
||||
from PyQt6.QtCore import (QDateTime, QObject, QRect, QSettings, Qt,
|
||||
QThreadPool, QTimer, QUrl, pyqtSignal)
|
||||
from PyQt6.QtGui import (QAction, QCloseEvent, QDesktopServices, QIcon,
|
||||
QKeySequence, QPixmap, QTextCursor)
|
||||
from PyQt6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog,
|
||||
|
|
@ -21,9 +21,9 @@ from requests import get
|
|||
from whisper import tokenizer
|
||||
|
||||
from .__version__ import VERSION
|
||||
from .model_loader import ModelLoader
|
||||
from .transcriber import FileTranscriber, OutputFormat, RecordingTranscriber
|
||||
from .whispr import LOADED_WHISPER_DLL, Task
|
||||
from .model_loader import ModelLoader
|
||||
|
||||
APP_NAME = 'Buzz'
|
||||
|
||||
|
|
@ -770,7 +770,7 @@ class AppIcon(QIcon):
|
|||
|
||||
|
||||
class AboutDialog(QDialog):
|
||||
def __init__(self, parent: Optional[QWidget]=None) -> None:
|
||||
def __init__(self, parent: Optional[QWidget] = None) -> None:
|
||||
super().__init__(parent)
|
||||
|
||||
self.setFixedSize(200, 200)
|
||||
|
|
@ -866,7 +866,7 @@ class MainWindow(QMainWindow):
|
|||
|
||||
def on_import_audio_file_action(self):
|
||||
(file_path, _) = QFileDialog.getOpenFileName(
|
||||
self, 'Select audio file', '', 'Audio Files (*.mp3 *.wav *.m4a *.ogg);;Video Files (*.mp4 *.webm *.ogm)')
|
||||
self, 'Select audio file', '', FileTranscriber.SUPPORTED_FILE_FORMATS)
|
||||
if file_path == '':
|
||||
return
|
||||
self.new_import_window_triggered.emit((file_path, self.geometry()))
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ class FileTranscriber:
|
|||
stopped = False
|
||||
current_thread: Optional[Thread] = None
|
||||
current_process: Optional[multiprocessing.Process] = None
|
||||
SUPPORTED_FILE_FORMATS = 'Audio files (*.mp3 *.wav *.m4a *.ogg);;Video files (*.mp4 *.webm *.ogm *.mov);;All files (*.*)'
|
||||
|
||||
class Event():
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue