community icon indicating copy to clipboard operation
community copied to clipboard

Kivy sound

Open rsshruti opened this issue 12 years ago • 5 comments

Can not play sound on ubuntu 14.04. Please help, how can I play sound in kivy as I am very new to this.

shruti@shruti-OptiPlex-780:~/src/naoWithPython/FindMe$ python kivyapp.py [INFO ] [Logger ] Record log in /home/shruti/.kivy/logs/kivy_14-10-11_8.txt [INFO ] Kivy v1.9.0-dev [INFO ] [Python ] v2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] [INFO ] [Factory ] 171 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored) [INFO ] [Audio ] Providers: audio_pygame (audio_pygst, audio_ffpyplayer, audio_sdl ignored) Sound found at audio/chime.wav Sound is 0.000 seconds [INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored) [INFO ] [GL ] OpenGL version <3.3.0 NVIDIA 331.38> [INFO ] [GL ] OpenGL vendor [INFO ] [GL ] OpenGL renderer <Quadro NVS 420/PCIe/SSE2> [INFO ] [GL ] OpenGL parsed version: 3, 3 [INFO ] [GL ] Shading version <3.30 NVIDIA via Cg compiler> [INFO ] [GL ] Texture max size <8192> [INFO ] [GL ] Texture max units <32> [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked [INFO ] [Text ] Provider: pygame(['text_sdl2'] ignored) [INFO ] [OSC ] using for socket [INFO ] [Base ] Start application main loop [INFO ] [GL ] NPOT texture support is available [INFO ] [Base ] Leaving application in progress...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

rsshruti avatar Oct 11 '14 15:10 rsshruti

I also checked the versin of GsStreamer:

shruti@shruti-OptiPlex-780:~$ python -c 'import gi

from gi.repository import Gst print Gst.version()' (1L, 2L, 4L, 0L)

rsshruti avatar Oct 11 '14 15:10 rsshruti

@rsshruti Pygame says that the sound file is 0.000 seconds long, can you try another file. Also please post the applicable code, so we can see if you did it correctly.

FeralBytes avatar Feb 14 '15 00:02 FeralBytes

@rsshruti It turns out that kivy plays high quality sounds only (I had this problem some time ago this is what I concluded, the audio file size has to be big) see int the examples audio folder(that will probably run fine)

rastogiachyut avatar Feb 14 '15 13:02 rastogiachyut

some .wavs cannot be loaded depending on encoding

rastogiachyut avatar Feb 14 '15 16:02 rastogiachyut

If u wana go really hardcore here is some info on supported encoding--> http://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlloadwav.html otherwise just use a different file or .ogg It will simplify things for you.

rastogiachyut avatar Feb 14 '15 16:02 rastogiachyut