Open n41tik opened 2 days ago
This pull request implements real-time transcription functionality, improves the configuration handling, and refactors the audio recording and SOAP note generation process. The changes focus on enhancing the user experience and streamlining the code.
sequenceDiagram
actor User
participant UI as User Interface
participant MR as MediaRecorder
participant WS as Whisper Server
participant GUI as GUI Update
User->>UI: Click Record Button
UI->>MR: Start Recording
loop Every 5 seconds
MR->>WS: Send Audio Blob
WS-->>MR: Return Transcription
MR->>GUI: Update GUI with Transcription
end
User->>UI: Click Stop Button
UI->>MR: Stop Recording
classDiagram
class Config {
+String WHISPER_URL
+String WHISPER_API_KEY
+String AI_SCRIBE_URL
+String AI_SCRIBE_MODEL
+String AI_SCRIBE_CONTEXT_BEFORE
+String AI_SCRIBE_CONTEXT_AFTER
}
class MediaRecorder {
+ondataavailable(event)
+onstop()
+start()
+stop()
}
class UIElements {
+Element audioInputSelect
+Element recordButton
+Element stopButton
+Element userInput
+Element soapNotesElement
}
class Functions {
+toggleConfigView()
+convertAudioToText(audioBlob)
+updateGUI(text)
+generateSoapNotes(text)
}
Config --> MediaRecorder : uses
UIElements --> MediaRecorder : interacts
Functions --> MediaRecorder : controls
Functions --> Config : accesses
Functions --> UIElements : updates
Change | Details | Files |
---|---|---|
Implement real-time transcription |
|
index.js |
Improve configuration handling |
|
index.js |
Refactor audio recording process |
|
index.js |
Enhance SOAP note generation |
|
index.js |
Update API authentication method |
|
index.js |
Summary by Sourcery
Implement real-time transcription by periodically restarting the media recorder and refactor code for improved readability and API key handling.
New Features:
Enhancements: