Created
May 27, 2014 18:01
-
-
Save fernandolopez/0748f7b3d1cdc9c170dc to your computer and use it in GitHub Desktop.
Ejemplos de audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Con archivos grandes tarda mucho hay que usar audios cortos | |
# hay otro ejemplo más completo en: | |
# http://www.stuartaxon.com/2008/02/24/playing-a-sound-in-pygame/ | |
import pygame | |
import time | |
pygame.init() | |
sound = pygame.mixer.Sound('audiobook.ogg') | |
canal = sound.play() | |
time.sleep(10) # Reproducir por 10 segundos | |
canal.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment