(Redirected from How to record a sound)

Archived:How to record a sound in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition
Keywords: audio
Created: cyke64 (15 Mar 2007)
Last edited: hamishwillee (14 Jun 2013)



This snippet shows how to record audio in Python.


Valid file formats must be used. Their availability may vary from one device generation to another and they tipically include WAV, AMR, MP3, AAC, RA.

Source code

import e32, audio
#Open a sound file at the given path
s = audio.Sound.open(u"C:\\sound.amr")
#Start recording
#Instantiate a timer
t = e32.Ao_timer()
#Record for 10 seconds, then stop
t.after(10, lambda:s.stop())


Sound is recorded to an audio file at the specified path.

Known issue

Issue with Nokia 6600: Apparently files recorded in WAV format cannot be played. It seems Nokia 6600 has the problem with uncompressed 16-bit wave but it can play other wave files fine.

This page was last modified on 14 June 2013, at 08:10.
42 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.