I have been using ecasound for quite some time now for enabling my wife
to dictate medical reports and it has worked superbly.
Now I have a need to write transcription software (that is playback
controlled by foot pedals so a typist can transcribe them.)
I have two problems - which are related to each other.
Firstly ecasound gives me incomplete playback - which I believe is at
least in part due to buffering on the sound card. I can get around that
by adding "silence" to the end of the audio files to be transcribed
(although a fix would be rather nice). In my case the "lost" audio time
is significant because I have a need to keep the size of the audio files
to a minimum and so am recording 1 channel, 8 bits and 11,025KHz. "Lost"
time depends upon the computer being used (presumably the sound card) but
is typically 50 to 100 seconds. At CD quality recording we would only be
talking say 10 seconds or less and for 5.1 etc even less. I would be
interested in knowing if others have this same experience and its not just
some setup fault on my part.
For transcription I need the ability to pause the audio, rewind a little
and continue when requested. This means I need to be able to find out
the position I am at. (Works fine when recording). But in playback
mode the various get-position functions get not the position of what has
been played back but the position in what has been sent to the sound card
- in other words for much of the time it is ahead of what has been played
by the contents of the buffer. I rather desperately need a way around
this. In the short term I might have to do my own separate timing
outside of ecasound. I did write some code interacting with ALSA
directly (doesn't seem to want to run on Ubuntu 12.04.1) and overcame the
buffering issue by using the ALSA API function snd_pcm_delay - this was
the interface code I wrote (for Harbour):
HB_FUNC( ALSA4H_PCM_DELAY )
hb_retni( snd_pcm_delay( ( ( snd_pcm_t * ) hb_parptr( 1 ) ),
hb_storni( delayp, 2 );
I guess that I've played with ALSA enough to know just how great it is to
have ecasound and the ECI but an ECI command to get the delay would be just
wonderful. Maybe it already exists or there is a solution to this issue
but if so I haven't been able to find it. I only wish I had the
capability to contribute such an enhancement myself.
This is not only important for transcription but would be appreciated
when dictating as one could then go back and replay what one has just said
and optionally record over something that you want to change.
Thanks for reading and thanks Kai for ecasound.
One thing, that I can think of: Try the buffering parameters of Ecasound and
set them low.
-B:rtlowlatency -r 20 -b:64 (buffersize in samples)
You can also try:
Of course the lower the samplerate, the more effect the buffering takes. If
file size wasn't such an issue, I'd say: use JACKd and a normal samplerate and
a low periodsize (64 or 128) for JACK and have done with it.
I think, there have been related issues once, but it would have been some
time ago. Which version of Ecasound are you using? The current stable version
is 2.9.0. There you also have a special command to stop everything in sync,
that might also help: stop-sync instead of the normal stop or s command.
I hope, some of that can be of use to you.