mirror of
https://github.com/patw/AudioSumma.git
synced 2025-04-22 08:39:08 +00:00
UI looks a bit better now
This commit is contained in:
parent
fe50d40fce
commit
cb00762378
6 changed files with 16 additions and 4 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
Record your local audio and summarize it with whisper.cpp and llama.cpp! Open source, local on-prem transcription and summarization!
|
Record your local audio and summarize it with whisper.cpp and llama.cpp! Open source, local on-prem transcription and summarization!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
BIN
headphones.png
Normal file
BIN
headphones.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 3.4 KiB |
18
meetings.py
18
meetings.py
|
@ -4,23 +4,30 @@ import subprocess
|
||||||
import pyaudio
|
import pyaudio
|
||||||
import wave
|
import wave
|
||||||
import threading
|
import threading
|
||||||
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QInputDialog
|
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QHBoxLayout, QInputDialog, QLabel
|
||||||
|
from PyQt5.QtGui import QIcon, QPixmap
|
||||||
|
|
||||||
class RecordingApp(QWidget):
|
class RecordingApp(QWidget):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.initUI()
|
self.recording_pixmap = QPixmap("recording.png")
|
||||||
|
self.not_recording_pixmap = QPixmap("notrecording.png")
|
||||||
self.is_recording = False
|
self.is_recording = False
|
||||||
self.audio_thread = None
|
self.audio_thread = None
|
||||||
self.stream = None
|
self.stream = None
|
||||||
self.p = None
|
self.p = None
|
||||||
self.wf = None
|
self.wf = None
|
||||||
|
self.initUI()
|
||||||
|
|
||||||
def initUI(self):
|
def initUI(self):
|
||||||
self.setWindowTitle('Meeting Recorder')
|
self.setWindowTitle('Meeting Recorder')
|
||||||
self.setGeometry(500, 500, 500, 150)
|
self.setGeometry(500, 500, 500, 150)
|
||||||
|
|
||||||
layout = QVBoxLayout()
|
layout = QHBoxLayout()
|
||||||
|
|
||||||
|
self.status_label = QLabel(self)
|
||||||
|
self.status_label.setPixmap(self.not_recording_pixmap)
|
||||||
|
layout.addWidget(self.status_label)
|
||||||
|
|
||||||
self.record_button = QPushButton('Record', self)
|
self.record_button = QPushButton('Record', self)
|
||||||
self.record_button.clicked.connect(self.toggle_recording)
|
self.record_button.clicked.connect(self.toggle_recording)
|
||||||
|
@ -47,6 +54,7 @@ class RecordingApp(QWidget):
|
||||||
if ok and filename:
|
if ok and filename:
|
||||||
self.is_recording = True
|
self.is_recording = True
|
||||||
self.record_button.setText('Stop Recording')
|
self.record_button.setText('Stop Recording')
|
||||||
|
self.status_label.setPixmap(self.recording_pixmap)
|
||||||
self.audio_thread = threading.Thread(target=self.record_audio, args=(filename,))
|
self.audio_thread = threading.Thread(target=self.record_audio, args=(filename,))
|
||||||
self.audio_thread.start()
|
self.audio_thread.start()
|
||||||
|
|
||||||
|
@ -54,6 +62,7 @@ class RecordingApp(QWidget):
|
||||||
if self.is_recording:
|
if self.is_recording:
|
||||||
self.is_recording = False
|
self.is_recording = False
|
||||||
self.record_button.setText('Record')
|
self.record_button.setText('Record')
|
||||||
|
self.status_label.setPixmap(self.not_recording_pixmap)
|
||||||
if self.audio_thread:
|
if self.audio_thread:
|
||||||
self.audio_thread.join()
|
self.audio_thread.join()
|
||||||
if self.stream:
|
if self.stream:
|
||||||
|
@ -114,6 +123,7 @@ class RecordingApp(QWidget):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
app.setWindowIcon(QIcon("headphones.png"))
|
||||||
ex = RecordingApp()
|
ex = RecordingApp()
|
||||||
ex.show()
|
ex.show()
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
BIN
notrecording.png
Normal file
BIN
notrecording.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 2.5 KiB |
BIN
recording.png
Normal file
BIN
recording.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 2.6 KiB |
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 7 KiB |
Loading…
Add table
Reference in a new issue