Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51012

Re: Play Ogg Files

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'apps,': 0.07; 'python3': 0.07; 'bash': 0.09; 'collier': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'already,': 0.16; 'compatible.': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'module).': 0.16; 'pygame': 0.16; 'pygame,': 0.16; 'python3.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'stefan': 0.19; '>>>': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'fine': 0.24; 'looks': 0.24; 'script': 0.25; 'header:X-Complaints- To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'host': 0.29; 'rest': 0.29; 'external': 0.29; 'am,': 0.29; 'converting': 0.30; 'code': 0.31; 'that.': 0.31; 'url:wiki': 0.31; 'continues': 0.31; 'convert': 0.35; 'received:84': 0.35; 'there': 0.35; 'url:ref': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'should': 0.36; 'audio': 0.38; 'to:addr:python-list': 0.38; 'heard': 0.39; 'skip:. 10': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'mentioned': 0.61; 'url:%20': 0.61; 'simple': 0.61; 'making': 0.63; 'show': 0.63; 'provide': 0.64; 'more': 0.64; 'jobs': 0.68; 'to,': 0.72; 'fast,': 0.84; 'received:arcor-ip.net': 0.84; 'received:pools.arcor-ip.net': 0.84; 'johnson,': 0.91; 'lucky': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: Play Ogg Files
Date Sun, 21 Jul 2013 16:10:16 +0200
References <51E9E29E.7010203@Gmail.com> <ksd37r$coj$1@ger.gmane.org> <51EA81A8.9060608@Gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host dslb-084-056-019-021.pools.arcor-ip.net
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7
In-Reply-To <51EA81A8.9060608@Gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4955.1374415827.3114.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374415827 news.xs4all.nl 16002 [2001:888:2000:d::a6]:49220
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51012

Show key headers only | View raw


Devyn Collier Johnson, 20.07.2013 14:25:
> On 07/20/2013 12:21 AM, Stefan Behnel wrote:
>> Devyn Collier Johnson, 20.07.2013 03:06:
>>> I am making a chatbot that I host on Launchpad.net/neobot. I am currently
>>> converting the engine from BASH code to Python3. I need to convert this for
>>> cross-platform compatibility. I do not need to use Mplayer; I just show the
>>> below code to give others a better idea what I am doing. I would prefer to
>>> be Python3 independent; I do not want to use the system shell. I am fine
>>> with using Python3 modules like Pygame (if there is a py3 module). As long
>>> as the code is fast, efficient, and simple without depending on the system
>>> shell or external apps, that would be nice. I also need the code to execute
>>> while the rest of the script continues running.
>>>
>>>      jobs = multiprocessing.Process(SEND = subprocess.getoutput('mplayer
>>> -nogui -nolirc -noar -quiet ./conf/boot.ogg')) #Boot sound#
>> Well, since you mentioned it already, have you actually looked at pygame?
>> It should be able to do what you want. There's also pyaudio, which is more
>> specialised to, well, audio. A web search for python and ogg might provide
>> more.
>
> Thanks Stefan! I have not heard of Pyaudio; I will look into that. As for
> Pygame, I have not been able to find any good documentation for playing
> audio files.

A quick duckduckgo search gave me this, at least:

http://www.pygame.org/docs/ref/mixer.html


> Plus, I recently learned that Pygame is not Python3 compatible.

Looks like it's your lucky day:

http://www.pygame.org/wiki/FrequentlyAskedQuestions#Does%20Pygame%20work%20with%20Python%203?

Stefan

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Play Ogg Files Stefan Behnel <stefan_ml@behnel.de> - 2013-07-21 16:10 +0200

csiph-web