Playing wav or mp3 files from script on FR?

13 messages Options
Embed this post
Permalink
RANJAN-3

Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
Hi,

Is there a way you can play sounds wav or mp3 using python scripts in FR?

Sriranjan

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Stefan Monnier

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
> Is there a way you can play sounds wav or mp3 using python scripts in FR?

   apt-get install sox

and then pass those files to /usr/bin/play?


        Stefan


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Michael 'Mickey' Lauer-2

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
In reply to this post by RANJAN-3
Am Freitag, den 18.09.2009, 16:59 +0530 schrieb RANJAN:
> Is there a way you can play sounds wav or mp3 using python scripts in
>  FR?

On FSO-based systems, you can do this by using the
org.freesmartphone.Device.Audio APIs.

:M:


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink



On FSO-based systems, you can do this by using the
org.freesmartphone.Device.Audio APIs.

:M:

So will the audio play instantaneously this way?

Sriranjan


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Michael 'Mickey' Lauer-2

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
Am Freitag, den 25.09.2009, 19:10 +0530 schrieb RANJAN:

>
>        
>        
>        
>         On FSO-based systems, you can do this by using the
>         org.freesmartphone.Device.Audio APIs.
>        
>         :M:
>        
>        
>        
> So will the audio play instantaneously this way?

.wav will play pretty lagfree, everything else is using gstreamer, so
depending on the file type, it might take a couple of hundred
milliseconds to prefill the pipeline.

:M:


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink



.wav will play pretty lagfree, everything else is using gstreamer, so
depending on the file type, it might take a couple of hundred
milliseconds to prefill the pipeline.

Sriranjan

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink


On Mon, Sep 28, 2009 at 10:35 PM, RANJAN <[hidden email]> wrote:



.wav will play pretty lagfree, everything else is using gstreamer, so
depending on the file type, it might take a couple of hundred
milliseconds to prefill the pipeline.

Sriranjan

I think you were referring to this:
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Audio.html;hb=HEAD#PlaySound

So both are one and the same in terms of performance and loading speed in case of sound files?

Sriranjan

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink


On Mon, Sep 28, 2009 at 10:37 PM, RANJAN <[hidden email]> wrote:


On Mon, Sep 28, 2009 at 10:35 PM, RANJAN <[hidden email]> wrote:



.wav will play pretty lagfree, everything else is using gstreamer, so
depending on the file type, it might take a couple of hundred
milliseconds to prefill the pipeline.

Sriranjan

I think you were referring to this:
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Audio.html;hb=HEAD#PlaySound

So both are one and the same in terms of performance and loading speed in case of sound files?

Sriranjan

When I type this

$mdbus -s org.freesmartphone.Device.Audio /org/freesmartphone/Device/Audio org.freesmartphone.Device.Audio.PlaySound '1.wav'

I doubt my syntax at the command line is right!

I get "service not found error"

Sriranjan

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Al Johnson

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
On Monday 28 September 2009, RANJAN wrote:

> On Mon, Sep 28, 2009 at 10:37 PM, RANJAN <[hidden email]> wrote:
> > On Mon, Sep 28, 2009 at 10:35 PM, RANJAN <[hidden email]> wrote:
> >>> .wav will play pretty lagfree, everything else is using gstreamer, so
> >>> depending on the file type, it might take a couple of hundred
> >>> milliseconds to prefill the pipeline.
> >>
> >> So you are referring to this one here:
> >>
> >> http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.frees
> >>martphone.MusicPlayer.html;hb=HEAD#Play
> >>
> >> Sriranjan
> >
> > I think you were referring to this:
> >
> > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesm
> >artphone.Device.Audio.html;hb=HEAD#PlaySound
> >
> > So both are one and the same in terms of performance and loading speed in
> > case of sound files?
> >
> > Sriranjan
>
> When I type this
>
> $mdbus -s org.freesmartphone.Device.Audio /org/freesmartphone/Device/Audio
> org.freesmartphone.Device.Audio.PlaySound '1.wav'
>
> I doubt my syntax at the command line is right!
>
> I get "service not found error"
>
> Sriranjan

You're using the wrong service, and missing a couple of arguments. Try this:

mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/Audio
org.freesmartphone.Device.Audio.PlaySound /path/to/sound.wav 0 1

This one will list the methods and signals available, as well as the
arguments:

mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/Audio

_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Frederik Sdun

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
In reply to this post by RANJAN-3
* RANJAN <[hidden email]> [28.09.2009 19:41]:

>    On Mon, Sep 28, 2009 at 10:37 PM, RANJAN <[hidden email]> wrote:
>
>      On Mon, Sep 28, 2009 at 10:35 PM, RANJAN <[hidden email]> wrote:
>
>          .wav will play pretty lagfree, everything else is using gstreamer,
>          so
>          depending on the file type, it might take a couple of hundred
>          milliseconds to prefill the pipeline.
>
>        So you are referring to this one here:
>        http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.MusicPlayer.html;hb=HEAD#Play
>        
>        Sriranjan
>
>      I think you were referring to this:
>      http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Audio.html;hb=HEAD#PlaySound
>
>      So both are one and the same in terms of performance and loading speed
>      in case of sound files?
>
>      Sriranjan
>
>    When I type this
>
>    $mdbus -s org.freesmartphone.Device.Audio /org/freesmartphone/Device/Audio
>    org.freesmartphone.Device.Audio.PlaySound '1.wav'
>
>    I doubt my syntax at the command line is right!
>
>    I get "service not found error"
>
>    Sriranjan
I didn't push the music player yet. This is a more like a media player,
  which is integrated into fso. org.freesmartphone.Device.Audio is for
  system sounds.
  1. you need an absolute path to the file
  2. the PlaySound method has an additional loop (=1) and length (=0)
    parameter

Regards,
        Frederik

> _______________________________________________
> devel mailing list
> [hidden email]
> https://lists.openmoko.org/mailman/listinfo/devel


--
IRC: playya @ Freenode, Gimpnet
xmpp: [hidden email]


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel

signature.asc (204 bytes) Download Attachment
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Al Johnson

You're using the wrong service, and missing a couple of arguments. Try this:

mdbus -s org.freesmartphone.odeviced /org/freesmartphone/Device/Audio
org.freesmartphone.Device.Audio.PlaySound /path/to/sound.wav 0 1


Well this executes without any error (if I also give the 0 1 in the end),but I cant hear any sound play from the speakers.Also what does the 0 1 at the end of the script do?

Sriranjan
 


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
RANJAN-3

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink



>Well this executes without any error (if I also give the 0 1 in the end),but I cant hear any sound play from the speakers.Also what >does the 0 1 at the end of the script do?

>Sriranjan

Solved

Sriranjan


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel
Rafael Ignacio Zurita

Re: Playing wav or mp3 files from script on FR?

Reply Threaded More More options
Print post
Permalink


--- On Sun, 10/4/09, RANJAN <[hidden email]> wrote:
 
> >Well this executes without any error (if I also give
> the 0 1 in the end),but I cant hear any sound play from the
> speakers.Also what >does the 0 1 at the end of the script
> do?
>
>
> Solved

How?


_______________________________________________
devel mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/devel