-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a button to record new samples #77
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few suggestions for changes.
Best,
Andreas
self.session.setRecorder(self.recorder) | ||
self.recorder.setMediaFormat(QMediaFormat.Wave) | ||
self.recorder.setEncodingMode(QMediaRecorder.ConstantBitRateEncoding) | ||
self.recorder.setAudioSampleRate(16000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose to record and save in full quality, e.g. 48000 kHz, and then reduce the sample rate later for training and inference
self.recorder.setMediaFormat(QMediaFormat.Wave) | ||
self.recorder.setEncodingMode(QMediaRecorder.ConstantBitRateEncoding) | ||
self.recorder.setAudioSampleRate(16000) | ||
self.recorder.setAudioBitRate(32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 16 Bit is the standard here, but I am unsure.
if not self.project.audio_folder or not self.project.audio_folder.is_dir(): | ||
return | ||
if self.recorder.recorderState() == QMediaRecorder.StoppedState: | ||
name = "000" + "".join(random.choices("0123456789abcdef", k=125)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random is difficult, as it might happen at random, that the same value is chosen, which might lead to bugs.
Fixes #72
Todo:
Future work: