Problem with audio in s60
hey ... im a new member of this community
i have started developing python scripts for my phone
i made a voice messenger for laptop using pyaudio in python and using sockets to transfer data
self.pin=pyaudio.PyAudio()
streamin=self.pin.open(format=self.format,
channels=self.channels,
rate=self.rate,
output = True,
frames_per_buffer = chunk)
global wf
while 1:
data=self.sock.recv(4096)
if data:
streamin.write(data)
Above was my code for receiving data over socket and converting to audio...
i want to do the same over the phone in symbian s60 !
is it possible with the audio library in s60 ?
if not, is there a way i can import pyaudio in my phone ?
dos_killer
Junior Poster in Training
50 posts since Dec 2010
Reputation Points: 15
Solved Threads: 4
Moving to Python, as in this case more suitable for this question
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
i've already seen this tutorial ... but you didnt get my point...
i want a hack so that the person holding the phone speaks something and then that data is sent over a socket and vice versa...this site gave me information on how to record audio ...i dont want to use files even temporary ... want to rely solely on sockets ...
dos_killer
Junior Poster in Training
50 posts since Dec 2010
Reputation Points: 15
Solved Threads: 4
lol..yes i completely understand you...and i have three apps...but in a different way .. two are clients and one is a server (this provision so as to incorporate more than one client later)
i have made the client for my laptop and the server( using pyaudio in wav format ) ... they both work perfectly fine...
above is my code for receiving data over a socket and using pyaudio i convert it to voice...
i need a way through which i can do the same on my phone...
apparently the audio library on my phone isnt very helpful in this regard ... since i cant figure out a way to directly convert incoming data over socket to audio ...and
also ... this question has been bothering me for a while...
Ques ) Can i import other modules in my phone ( for python) other than the ones provided by default...it would be great if i could use lightblue or pyaudio on my phone too ..
and by the way .,.. thanks a lot for your help :)
PS : i went through the link you provided..but i assume all the wave functions defined there must open a wav file...which is what im trying to avoid...i only wish to open an audio stream and write straight to that audio stream ... looking at my code in my first post in thread might make my point more clearer...
dos_killer
Junior Poster in Training
50 posts since Dec 2010
Reputation Points: 15
Solved Threads: 4
well thats exactly what i wanted...
and now i feel really stupid .. lol
but thanks a lot for your help ... i didnt receive much support over nokia forum ..
dos_killer
Junior Poster in Training
50 posts since Dec 2010
Reputation Points: 15
Solved Threads: 4
silly question...but doesnt nokia support wave ?
i have workede with wave and its lot easier to handle...midi seems to be a slight pain here.,.struggling with pygame...
dos_killer
Junior Poster in Training
50 posts since Dec 2010
Reputation Points: 15
Solved Threads: 4