Ticket #188 (new defect)
delay in clicking record or stop
Reported by: | kmaclean | Owned by: | kmaclean |
---|---|---|---|
Priority: | major | Milestone: | SpeechSubmission 0.1.10 |
Component: | SpeechSubmission | Version: | Website 0.2 |
Keywords: | Cc: |
Description
it seems like if you click record or stop on the Java recording application that your recording will be cut off if you don't wait for half a second after you speak.
record does not seem to start immediately either
Change History
comment:2 Changed 13 years ago by kmaclean
or use the wait(100) command - but this seems to be related to threading ...
comment:3 Changed 12 years ago by kmaclean
See this web site for a possible explanation: BAS SpeechRecorder
Important note for reliable recordings:
Recording sound in principle requires some kind of real-time processing. The audio data generated from the Analog/Digital? converter must be processed within a defined time-interval, otherwise data may be lost. Although most desktop PCs and Notebooks and their operating systems do not have real-time capabilities and therefore cannot guarantee that the audio stream is processed reliably, sound recording works properly if the PC is fast enough to process the data.
For programs written in Java (and probably C# respectively Managed Code) there is an additional issue, which makes it hard to achieve near real-time behaviour: the garbage collector. The garbage collector of the Java virtual machine frees memory of unreferenced objects in unregular time intervalls. The entire application is stopped during the cleanup. If the cleanup happens during a sound recording and takes too long it is possible that audio data is lost. Unlike buffer overruns it is not possible to detect this data loss.
To avoid data loss SpeechRecorder? makes use of the incremental garbage collector, which reduces the duration of garbage collector pauses. To further minimize the risk of data loss, please use the fastest hardware available.
The following configuration is particularly prone to data loss:
- using HTML/RTF text, and
- promptphase 'recording'
For processing these items, the Java VM loads extensive image and text processing libraries which must then be cleaned by the garbage collector.
Might be able to use this to delay stop while buffer empties