fix: audio export quality and Whisper language selection#4
Open
ScreepCode wants to merge 1 commit into
Open
Conversation
- SystemAudioCapture: raise sample rate from 16 kHz to 48 kHz so exported audio captures the full voice frequency range (0–24 kHz) instead of being limited to 8 kHz (Nyquist of 16 kHz) - MeetingRecorder: update audio file settings to 48 kHz / 128 kbps AAC; write original 48 kHz PCM to the audio file in handleSystemAudioBuffer instead of the already-downsampled 16 kHz buffer that was fed to SFSpeech; fix writeMicAudio memcpy fast-path to also trigger for stereo hardware input (was gated on channelCount == 1 unnecessarily) - WhisperEngine: add `language` property (default "en"), use it in transcribeChunk instead of a hardcoded language string; set it from MeetingRecorder.startRecording() via the 2-letter ISO prefix of recognitionLanguage (e.g. "de-DE" → "de") Fixes thehwang#2, fixes thehwang#3
c211121 to
0c22e3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
languageproperty toWhisperEngineand wires it up fromMeetingRecorder.startRecording()using the 2-letter ISO prefix ofrecognitionLanguage(e.g."de-DE"→"de"). PreviouslytranscribeChunkhad the language hardcoded, so the mic channel always transcribed in one language regardless of the UI selection.Changes
SystemAudioCapture.swiftconfig.sampleRate: 16 000 → 48 000MeetingRecorder.swiftaudioFileSettings: 48 kHz / 128 kbps; write original PCM to file; fixwriteMicAudiomemcpy conditionWhisperEngine.swiftlanguageproperty, useself.languageintranscribeChunkTest plan
audio-mic.m4aandaudio-system.m4asound noticeably louder/fuller than before