forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sampling rate with audio mechanica

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
PeterLeRoi



Joined: 16 May 2007
Posts: 31

PostPosted: Thu Oct 25, 2007 5:24 am    Post subject: Sampling rate with audio mechanica Reply with quote

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
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Thu Oct 25, 2007 8:27 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterLeRoi



Joined: 16 May 2007
Posts: 31

PostPosted: Thu Oct 25, 2007 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group