Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'apps,': 0.07; 'python3': 0.07; 'bash': 0.09; 'collier': 0.09; 'python': 0.11; 'already,': 0.16; 'compatible.': 0.16; 'module).': 0.16; 'pygame': 0.16; 'pygame,': 0.16; 'python3.': 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: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; 'received:10.0.0': 0.31; 'that.': 0.31; 'url:wiki': 0.31; '>>>>': 0.31; 'continues': 0.31; 'thanks!': 0.32; 'convert': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'url:ref': 0.36; 'thanks': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'should': 0.36; 'received:10': 0.37; 'audio': 0.38; 'to:addr:python-list': 0.38; 'heard': 0.39; 'skip:. 10': 0.39; 'to:addr:python.org': 0.39; '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; 'johnson,': 0.91; 'lucky': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=RjwYotWuvP2uGA3Mwyi686p9xY3/RVJBJX/19doyAkg=; b=MH6io5fry4/CDWIx17TBLQVXFksITKKybKTJPwTYqfs8iCV99q5p/y3sQ5UWqzQPK6 i8e9BOLoECDCLJdc97k0NDv8r3t4t2f+0F4B4Lvixl/mnKIaFNFolswD/IO7GOBhsY8H xpOtEItAhiInoSfKNZrGC3IsyyXfWQx2XWeQn6pC6gSp2JHwPWmmYXl00PwB7sipeyPW P6Q7P55znKEHoACIo5H9WJ5LMPqm5tlyNEPJl/Bb/RKjmfIvJIKDY85OR7fexpQq7RLb MoFz2/J97XiBbxRXgCAU0cAdpMKjs4JutxZn6Vm3FdL0WDghyWCLisP1udbq75g1jgBV 15kg== X-Received: by 10.42.74.72 with SMTP id v8mr17273437icj.31.1374497751434; Mon, 22 Jul 2013 05:55:51 -0700 (PDT) Date: Mon, 22 Jul 2013 08:55:38 -0400 From: Devyn Collier Johnson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Python Mailing List Subject: Re: Play Ogg Files References: <51E9E29E.7010203@Gmail.com> <51EA81A8.9060608@Gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374497759 news.xs4all.nl 15951 [2001:888:2000:d::a6]:39852 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51039 On 07/21/2013 10:10 AM, Stefan Behnel wrote: > 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 > > Thanks! DCJ