Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.019 X-Spam-Evidence: '*H*': 0.96; '*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; 'shell': 0.22; 'header:User- Agent:1': 0.23; 'fine': 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; 'continues': 0.31; 'convert': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'thanks': 0.36; 'received:10.0': 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; '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 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=D0yZtrS5bEezNWeStezq3dWPSLbqGrRe3afB/BgKTFQ=; b=bz4bVzlS0TTLMj9cSka0A4RApT0l07lL1z2GYlaOdUQl43MKekiRLQqSygYgy81T27 Y+L+fyzwcwzeeH8v9f369NA/4kZ4A5O1ecRybnU37Lji0Ex5++JhXOA6adINkN/Nadq+ ymdyIRHX9XmKUL5M9P2CleBLfMzYIMoNlIjeTqaVsMIXFDLjKpKP5vdzGghWiP1TVsZi DArOYOpmUy5SQq7l1oDVEPYDK95nuUkABVrpoM0kT5DxqdlqNKsULanT8ch6cOBYoFRA 3/iW9rybmplqjvDtFCjvTMloJyElEaIShphkpNo+wx2tAEjbNs1JO3dMdCyOt7oQMzg7 CYjw== X-Received: by 10.50.12.5 with SMTP id u5mr14624844igb.58.1374323114630; Sat, 20 Jul 2013 05:25:14 -0700 (PDT) Date: Sat, 20 Jul 2013 08:25:12 -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-list@python.org >> Python Mailing List" Subject: Re: Play Ogg Files References: <51E9E29E.7010203@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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374323123 news.xs4all.nl 15898 [2001:888:2000:d::a6]:36354 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50963 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. > > Stefan > > 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. Plus, I recently learned that Pygame is not Python3 compatible. Mahalo, DCJ