From: Alec B. <wry...@gm...> - 2010-02-16 20:43:46
|
There's nothing Pythoncard-specific about the audio recording task, you simply need a GUI with a record button if I understand correctly? And probably a countdown to let them know how much time they have left unless they press the stop button? In the Pythoncard Resource Editor you'll simply be placing a bitmap button on a frame. If you want that record button to turn into a stop button while they're recording, you'll use SetBitmapLabel if I remember correctly, to change the graphic of the button. And in the Resource Editor, you'll add a command that is triggered when that button is pressed. For example the command might be called RecordButton, and in your file you'll put this line: on_RecordButton_command(self, event): ...print "record was pressed" ....#(do something here) As far as the countdown, you can either put it in the statusbar (look around for some examples, there are lots) or I believe you could update the text on a statictext widget. To check the time remaining and update the countdown, you'll use a timer. Timers are quirky and are applied to a specific widget, look for samples. For the audio recording, I did something very similar to what you're describing (a "confessional" at Burning Man) using this code as a starting point: http://www.daniweb.com/forums/thread259262.html On Tue, Feb 16, 2010 at 8:38 AM, Mohammad Abdollahi <m.a...@gm...>wrote: > Hi everyone, > > I am trying to create a GUI for audio recording to create a database of > utterances. So in principle I want it to work in a way that it presents like > 100 sentences one by one to the user and for each sentence the user can > start recording by pressing say "record" and he himself will be the one to > press STOP button when he is done saying each sentences and the audio is > stored somewhere and then moves to the next sentence. Now since I'm quite > new to this package I wanted to know if anyone can show me an example > similar to my task or perhaps general guidelines. because previously i had > done some simple Gui in MATLAB but I dont see PythonCard Gui design > organized in a same way. > > besides as usually in audio recording tasks (e.g. in MATLAB) i have to > specify the duration of the recording independent of the time that takes the > user to read a sentence out. So can I have such a user dependent recording > duration (controlled by two buttons mentioned above) using python card ? > > Many thanks in advance > > Best. > Mohammad > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > |