| View previous topic :: View next topic |
| Author |
Message |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Thu Oct 25, 2007 5:24 am Post subject: Sampling rate with audio mechanica |
|
|
Hello. I´m using Audio Mechanica´s source code to program a speech recognition for psp. The problem: Audio Mechanica samples at 44100 Hz, and I need 8000 Hz.
I thought the frequency could be changed in:
pspAudioInputInit(mic_level, 44100);
but if changed to 8000, my psp samples faster instead of slower :'( ... and fulls the buffer so quickly it freezes after 1 sec aprox.
Any ideas where can I change the sampling rate?
Thanks ;) |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Thu Oct 25, 2007 8:27 am Post subject: |
|
|
It's really the audio input lib that samples at 44100, same as the output
lib at the time.
It's only after AM came out we were able to change output frequency.
One solution is to handle it yourself the same way AM does it by ignoring
the samples you don't want.
As you can see from the source it is easier when the desired rate is divisible by 44100 though.
The author of the input lib is not active in the PSP community at the moment
due to work commitments.
If your writing your own program entirely (well at least using nothing more than AM)
I don't understand why you would need 8000 rate specificaly. _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Thu Oct 25, 2007 9:56 am Post subject: |
|
|
I need to include a .c file (one piece of the recognition part) which only works at 8000 Hz :(
8000 Hz is the lower frequency for speech recognition (well, taking the voice´s bandwidth from 0 Hz until 4000 Hz)
Thanks anyway, I´ll find some way to encode from 44,1 KHz to 8 KHz by software :)
Edit :
I´ve been reading docs... psp can sample at 44100 or 48000. At http://psp.jim.sh/pspsdk-doc/ , there´s the doc of a function: sceAudioSetFrequency but it doesn´t say which library it belongs.... :(
With 48000 Hz it would be perfect :) |
|
| Back to top |
|
 |
|