Sounddevice Python Example

net/glorylab/?rev=115&view=rev Author: sannindan Date: 2007-11-29 16:21:10 -0800 (Thu, 29 Nov 2007) Log Message. thanks for the view!!. The code is based on the sounddevice library for python, whose documentation is pretty sparse. We use cookies for various purposes including analytics. If you need NumPy, you should install it with your package manager or use a Python distribution that already includes NumPy (see above). Audio Aufnahme in Python Das ist ein Pythonscript welches Audio aufnimmt und in eine wav-Datei schreibt. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. i dont know how but some how, the audio is not detected. 7 - scipy - pandas - requests There also miniconda that comes without all packages. 0 PC CAMERA: Audio (hw:1,0), ALSA (1 in, 0 out) When I use pyaudio (python module) to get the device detail. RawOutputStream use plain Python buffer objects and don't need NumPy at all. Mido - MIDI Objects for Python¶ Version 1. Win32_SoundDevice - WMI sample in Python. New to Anaconda Cloud? Sign up! Use at least one lowercase letter, one numeral, and seven characters. On Debian: bashapt-get install python-dev portaudio19-devpip install python_speech_features h5py numpy scipy keras tensorflow zerorpc sounddevice psutil Note: if you do not have pip follow. That's correct. alsaaudio documentation¶. 0 and GPU v1. Glover, Victor Lazzarini and Joseph Timoney, Linux Audio Conference 2011. 6) (to use data preprocessing) mediadecoder (>=0. pi * 440 * t ), 44100 ). Let's look at few such examples and then we will move to the multiprocessing module of Python. Also see the page for tips on programming PortAudio on the PortAudio wiki. For some machines, the experiment I have created runs normally. That may not be the case with music, but very frequently, you'd be putting your threads to sleep. In a modern Python, you can use pip install soundfile to download and install the latest release of SoundFile and its dependencies. 11% 9 hyperledger-fabric-docs-zh-cn. io/en/latest. C# (CSharp) OpenTK. I am using a LabJack to fire a TTL pulse and then measuring the time it takes for the stimuli to appear on screen (using a Black Box Tool Kit). This modular design of installing applications by specifying dependencies (instead of including them in the package) leads to smaller package sizes in Debian. If the sound file has a space in the file name, surround the file name in quotes as shown in the example below. Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. Revision: 115 http://glorylab. The requirements. Podría suponerse que las siglas provienen de Python Install Package, aunque no hay certeza de esto. One of the examples provided on the matplotlib example page is an animation of a double pendulum. If I just opened the computer and printed the available devices I get:. set_source(). online_sounddevice. The module sounddevice provides access to the soundcard via PortAudio. Step 2, Open Settings. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. Does "python -m sounddevice" give sensible output: are your sounddevices in it; you can identify them at the (hw:x,y), where the x gives the audio device number. If not, and you are running Windows, it's possible you will need to install Microsoft Visual C++ 2015 Redistributable Update 3 RC. Although the chroma features and the similarity matrix I obtain seem to be the same as in the example page, the optimal path is completely different (see figure attached). This will bring up the Settings window. The C Foreign Function Interface for Python is used to access the C-API of the PortAudio library from within Python. Winther-Larsen from a matlab script originally written by Arnt Inge Vistnes ''' import sounddevice as sd import numpy as np from matplotlib import pyplot as plt T = 3. In this example, python and python-numpy are the two dependencies. # Jessica -- better known as Mango or Jess -- is a fetching example of ferrethood. 0 and GPU v1. $ pip3 install opencv-python Important. ewing/python/Pyrex pour petite bibliothèque C Cython http://www. Problem Statement I am encountering a frustrating issue on some of our Windows 7 machines. CM108 Audio Controller set as the default device. roll taken from open source projects. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks. dll, which is bandled with sounddevice is quite smaller than the one with pyo), but I tried out pyo with this dll and there was a latency of 50ms as well, so it doesn't have to do anything with the way portaudio was compiled, I think. Additionally, you can do real-time audio input/output using PyAudio. samplerate = fs sd. python-sounddevice 0. pip3 installs modules for Python 3, and pip installs modules for Python 2. Now that most python libraries can be install using pip it's relatively easy to manually install PsychoPy and all it's dependencies to your own installation of Python. Music software written in Python Audio Players * Bluemindo- Bluemindo is a really simple but powerful audio player in Python/PyGTK, using Gstreamer. More than 1 year has passed since last update. sourceforge. We have an instructable on DIY Amazon Echo Alexa - Alexa Voice Assistant on Raspberry Pi Zero Docking Hub. 最近收集了一些wim wmic的有关资料,现在贴一些上来,需要的可以顶帖,如果斑竹看的上可以加精! 谢谢,对于wim和wimc我不懂,最近听说这个东西很好,可以配合windows脚本完成绝大多数的系统维护操作,而且到ms网站上的脚本中心看到大量的脚本实例,觉得很有研究价值!. More than 1 year has passed since last update. install_requires = requests[security] numpy scipy matplotlib pandas pillow pyglet pyopengl soundfile sounddevice python-bidi arabic_reshaper cffi future json_tricks pyosf xlrd openpyxl pyserial pyyaml gevent msgpack-numpy msgpack-python psutil tables pyzmq moviepy opencv-python python-gitlab gitpython astunparse esprima freetype-py # Platform-specific dependencies. geoclue-example: 0. In this tutorial, you'll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. This modular design of installing applications by specifying dependencies (instead of including them in the package) leads to smaller package sizes in Debian. How to Install Google Assistant on Windows 10: Google Assistant is a virtual personal assistant rolled out by Google to Android devices in order to enter the market of AI assistants. You can rate examples to help us improve the quality of examples. In particular, I first tried doing this in pure PyQt, but failed. Please try again later. Additionally, you can do real-time audio input/output using PyAudio. If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on FreeNode. This package is mainly developed under Python 3. sleep(1) # NOTE: Since sound playback is async, allow sound playback to finish before Python exits PyGame I find PyGame to be very robust across a wide variety of systems (including embedded systems) to play audio from Python. For example, if you wanted to open the player to play "music. That's correct. Currently, there are wheels compatible with the official distributions of Python 2. The classes sounddevice. readthedocs. If you need help with Qiita, please send a support request from here. All this can be done in Python, using the sounddevice and PyDAQmx modules. Bluemindo is a free (as in freedom) software, released under GPLv3, only. I want to record from the microphone, I want to play sounds. one of Wagner's symphonies played by an orchestra or in a piano-reduced version. The foundations for Manageability in Windows 7/2008/Vista/XP/2000 and Millennium Edition/'98 are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM). I want the one that's the default/primary one. python-sounddevice 0. Hi there, I am running some timing tests with Expyriment. Detailed package information. Windows 7 Help Forums Windows 7 help and support Sound & Audio » Windows 7: How to toggle between default sound device using hotkey. Python coder. Once Python 3. soundsc(y) scales the values of audio signal y to fit in the range from –1. I am writing some python program that is related to sounds, so I used the SoundDevice python module which used PortAudio library. 26 Aug 2019 17:07:07 UTC 26 Aug 2019 17:07:07 UTC. For this specific application, I needed to precisely output a signal with same frequency of the input signal. OK, I Understand. PyAudio is inspired by:. In this tutorial, you'll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. Header And Logo. The source code is available here in the file trig. It’s designed to be as straight forward and Pythonic as possible: >>>. pyMIDI - Provides object oriented programmatic manipulation of MIDI streams. 5, fixing an issue with handling ImportErrors. You'll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats. Peripheral Links. * Rainsoft Development Library for Microsoft. For example, here's a simple notebook I created to explain how a bunch of sine waves add up to a square wave: At the heart of the project is the Sounddevice library for python. samplerate = fs sd. The 2nd example with subprocess. 401sec - sd output = 1. thanks for the view!!. wavfile to create a wav file which you can then play however you wish. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. is there any reason why you don't have the c++ bindings, nor the auto-detect feature enabled? enabling both would benefit apps like Mixxx and Lightworks (Non-linear video editor, that is in alpha-stage for linux) as well as benefiting other portaudio apps that may be written in C++. Below example records audio from microphone for #seconds as per variable duration which you can modify as per your requirements. By voting up you can indicate which examples are most useful and appropriate. I havent looked at pyaudio but I've used sounddevice as well on few occasions. If you need NumPy, you should install it with your package manager or use a Python distribution that already includes NumPy (see above). 'sounddevice']) Get unlimited access to the best stories on Medium — and support writers while you’re at it. * cplay - a curses front. i dont know how but some how, the audio is not detected. The requirements. 0 # Duration of recording Fs = 11025 # Sampling rate N = Fs*T # For plotting t = np. Additional prerequisites are the following: Python (tested with v2. On Linux, you need to install libsndfile using your distribution's package manager, for example sudo apt-get install libsndfile1. Mac users can read more in our Resolving Audio Interface Issues on Mac. One of the examples provided on the matplotlib example page is an animation of a double pendulum. 7 this example program only holds a given number of audio blocks in memory and is therefore able to play files that. Here are a selection of just a few that have benefited from upgrades in SDK 0. 7) Step 6: Install audio: librosa, pyaudio, sounddevice $ conda install -c conda-forge librosa $ conda install -c anaconda pyaudio $ conda install -c conda-forge python-sounddevice Step 7: some other tricks. 4ti2 7za _go_select _libarchive_static_for_cph. wait() for i in range(7):. this is a early adoption of inter grading google home to our raspberry pi, more tutorials will follow soon. In a nutshell, a callback can be informally described like this: function a calls function b, and wants to make b run a specific independent chunk of code at some point during b's. I need to either 1/ establish a connection with the remote audio source at the system level so the system thinks that audio is coming in via the local microphone jack or 2/ make Python/[PyAudio or sounddevice] see that remote audio stream as the input that is to be read from. Get the Anaconda Cheat Sheet and then download. 12or greater. El dispositivo de sonido grabará el audio del micrófono de su computadora portátil (entrada de audio estándar) y lo reproducirá en el altavoz o los auriculares (salida de audio estándar). Audio in Python. Python Flask Tutorial For Beginners May 22, 2018 Mindmajix - Online global training platform connecting individuals with the best trainers around the globe. online_sounddevice. All the documentation and examples I've found are for sound devices that are directly attached to the hardware running Python. In this instructable, we will show you how to install and setup Google Assistant on a Pi Zero W with MakerSpot's Raspberry Pi Zero Docking Hub and Bluetooth speaker. 2019-05-16 Remote Temperature and Humidity Monitoring With ESP8266 and Blynk App. 12or greater. OK, I Understand. Was it intentional to only match on the package name and not the full atom? 2017-04-04 19:21:34 leitao: I don’t think that adding another source url would be really useful 2017-04-04 19:22:14 leitao: for example in the case of LuaXML it would not work at all, b/c tarball from GitHub has different checksum 2017-04-04 19:22:38 jirutka, right, I. 0, and then sends the data to the speaker at the default sample rate of 8192 hertz. lnk --> points to ZSNES Next, create a batch file and call it whatever you like, for example: RCB. RawStream, sounddevice. Here is a trivial example in C++ which uses jackd :. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Play a Sound File; Input to Output Pass-Through; Real-Time Text-Mode Spectrogram; python-sounddevice Example Programs. readthedocs. Toggle navigation. This Python module provides bindings for the PortAudio library and a few convenience functions to play and record NumPy arrays containing audio signals. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. Getting started with GStreamer with Python [] Ubuntu | Jono Bacon: Debugging Jokosher Guide - [] Getting started with GStreamer with Python [] Mixing no Linux com Python, GTK2 e GStreamer at Liberdade na era tecnológica? - [] Graças ao esforço do Jono em incentivar quem pegue nesta matéria, estive a brincar com os. That's correct. 30秒内便能学会的30个超实用Python代码片段 许多人在数据科学、机器学习、web开发、脚本编写和自动化等领域中都会使用Python,它是一种十分流行的语言。 Python流行的部分原因在于简单易学。 本文将简要介绍30个简短的、且能在30秒内掌握的代码片段。 1. python -m pygame. The audio injector uses the standard Linux ALSA audio subsystem. Updated on 27 October 2019 at 17:32 UTC. python-sounddevice 0. If you need NumPy, you should install it with your package manager (from a package named python3-numpy or similar) or use a Python distribution that already includes NumPy (see above). Welcome to a Natural Language Processing tutorial series, using the Natural Language Toolkit, or NLTK, module with Python. Detailed package information. pip install pysoundfile --user. readthedocs. Here are a selection of just a few that have benefited from upgrades in SDK 0. This package is mainly developed under Python 3. Python offers superb support for sound streaming from and to the soundcard, so that you can focus on the signal processing. RawInputStream and sounddevice. Below is the package information used to build the Python 2. Play a Sound File; Input to Output Pass-Through; Real-Time Text-Mode Spectrogram; python-sounddevice Example Programs. How get sound input from microphone in python, and process it on the fly? Greetings, I'm trying to write a program in Python which would print a string every time it gets a tap in the microphone. C# (CSharp) OpenTK. Audio streams form the central functionality of the sound server. Hey, ich bin ein angehender "Python-Programmierer", weil ich Bock drauf hatte und bin grad dabei, mithilfe des Buchs "Hello World" Python zu lernen. com 今回は、Snowboyを用いて自分の作成したホットワードでGoogleAssistantを起動させる。. If pip is not already bundled with your installation of Python, get it here. The 2nd example with subprocess. RawStream, sounddevice. The C examples can be compiled from the build directory by running: make examples The following Python commands will load and read data located in a directory "/data/test". This script will find the audio files, and then play them on as many devices as there are attached. inner (a, b) ¶ Inner product of two arrays. Using python for research and acoustic signal processing. The job was to create some kind of box that could play eight different audio files at the same time on eight different unpowered speakers. In this guide I will be showing you how to create a Python program which will allow you to Stream video from the internet, split the audio into different elements…. By first scaling the data, soundsc plays the audio as loudly as possible without clipping. If you are creating a game, most of what you are looking for may already be included in the many PythonGameLibraries that are available. Python is a very useful programming language that has an easy to read syntax, and allows programmers to use. Ich Frage mich, ob es möglich ist, spielen die NumPy-Arrays in Echtzeit, bevor es tatsächlich auf die Platte geschrieben. Esta será una instalación única. 7, containing various fixes and improvements. The foundations for Manageability in Windows 7/2008/Vista/XP/2000 and Millennium Edition/'98 are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM). This page is an index containing a list of Windows Management Instrumentation (WMI) classes with samples in different scripting languages, like: vbscript, jscript, powershell, python, perl. Maintainer: [email protected] Most notably, we changed the import name from import pysoundfile to import soundfile in 0. Audio lets you play audio directly in an IPython notebook. com 今回は、Snowboyを用いて自分の作成したホットワードでGoogleAssistantを起動させる。. Mar 15, 2005. Whirlwind Tour Of Python - fast-paced introduction to Python essentials, aimed at researchers and developers. You can use one of hundreds of APIs to record and play audio. There are a few ways this can be done. To avoid messing up with the system python , it is perhaps wise to stick to python3 (that's where it would be better to use virtualenv). conda install noarch v0. We try as much as possible to keep things compatible with Python 2. In this post, I’ll give you a quick overview of what a Python program is, what Python programs can be used for, and how to write and run a simple Python program on the Raspberry Pi. 1 Windows 64 bit edition on ASUS vivobook. 06% 6 volttron. By voting up you can indicate which examples are most useful and appropriate. I've been trying to use a discrete wavelet transform on a. Audio recording with python-sounddevice. There are also some example coding distributed with the PyGST source which you may browse at the gst-python git repository. Anaconda is free and easy to install, and it offers free community support. This can be extremely useful for scientific computing, where we often use packages such as NumPy to efficiently store and manipulate large arrays of data. It will convert audio samples with specified. With PyAudio, you can easily use Python to play and record audio on a variety of platforms. Google Cloud Speech API, Microsoft Bing Voice Recognition, IBM Speech to Text etc. math/py-numpy: Use INSTALLS_EGGINFO, fixes pkg_resources detection Python packages installs. I want to record from the microphone, I want to play sounds. Python Flask Tutorial For Beginners May 22, 2018 Mindmajix - Online global training platform connecting individuals with the best trainers around the globe. An example list of packages from Audio in Python: * audioop * pyAudio * Pydub * sounddevice Ad. 01 - Setting up the Audio Interface¶. Without learning regular expressions don’t touch this topic. sin ( 2 * np. Was it intentional to only match on the package name and not the full atom? 2017-04-04 19:21:34 leitao: I don’t think that adding another source url would be really useful 2017-04-04 19:22:14 leitao: for example in the case of LuaXML it would not work at all, b/c tarball from GitHub has different checksum 2017-04-04 19:22:38 jirutka, right, I. playrec call, from what I can tell, is keeping what you passed to it and it's essentially a memory leak from your perspective. 01 - Setting up the Audio Interface¶. はpythonからでなくともただRaspberry Piで音楽を再生したい場合によく使用されます. Pour installer: python -m pip install pyaudio L'enregistrement d'exemple, depuis le site officiel: """PyAudio example: Record a few seconds of audio and save to a WAVE file. To understand how to write a GTK 3 Python application, using the introspection bindings, I decided a good learning tool for myself would be to try to port the 0. Python Sounddevice stream issue. Ich habe ein Python in dem man lernt mit Python zu programmieren. the PyPA2 recommended tool for installing Python packages. RawStream, sounddevice. net] has joined #ubuntu [12:00] don't use ubuntu-backports [12:00] i want to see someone actually use it [12:00] you'll have all kinds of problems upgrading in future [12:00] I should prolly shut it off. The classes sounddevice. Visual Studio 'Tools>Macros" Tutorial: Creating Visual Studio Tools Macros to quickly edit code. For example, playing a pure tone is as simple as import sounddevice as sd import numpy as np t = np. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Simple script to record sound from the microphone, dependencies: easy_install pyaudio - sound_recorder. The steps are to fetch Python. py" example given in Sounddevice's documentation. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. A pop-up menu will appear. Audio lets you play audio directly in an IPython notebook. The volume control affects the amplitude; +/-2V seems to be the range for my computer. The job was to create some kind of box that could play eight different audio files at the same time on eight different unpowered speakers. Additional prerequisites are the following: Python (tested with v2. How can I play audio (it would be like a 1 second sound) from a Python script? It would be best if it was platform independent, but firstly it needs to work on a Mac. get (control) ¶. play (and dropped the channel argument) which unfortunately still didn't. readthedoc…. Questions: I want to create "heart rate monitor" effect from a 2D array in numpy and want the tone to reflect the values in the array. read("filepath") then x[0] is the sample rate, and x[1] is the array of data. This time, running simple test for matrix multiply with python list and python numpy. $\endgroup$ – MBaz Feb 28 at 23:11 $\begingroup$ Good idea, but just I tested to see if it ever goes above 1. For example, if you're trying to run survey that requires fetching the weather from a user input, it may make sense to pursue an active-asynchronous strategy to fetch the weather of the last. 07% 6 python-plexapi. rec (duration * fs, samplerate = fs, channels = 2, dtype = 'float64') # I would like to read myrecording into a stream at this point. object): SpectrAnalyzer( channels, samples_in, frequencies ) -> SpectAnalyzer Allow to analyze audio stream for frequencies. pip will fetch and install PyAudio wheels (prepackaged binaries). Note that in addition to the pastream library , pastream includes a command line application for playing and recording audio files. Windows audio device connectivity. gwmi win32_sounddevice. If you are interested have a look at http://python-sounddevice. Nikto 13/01/2017 13/04/2017. Combine Python with Numpy (and Scipy and Matplotlib) and you have a signal processing system very comparable to Matlab. 1 documentation » audiotools. read('myfile. PsychoPy provides an environment for creating psychology stimuli using Python scripting language. 6, we cleaned up many small inconsistencies, particularly in the the ordering and naming of function arguments and the removal of the indexing interface. Type x=wavfile. SpeechRecognition is a library that helps in performing speech recognition in python. This library binds with the PortAudio library. Press Install button and wait if it works. Is anyone using sounddevice or PyAudio or PortAudio successfully on sailfish? Can you give my any working example to record audio with python on sailfish? I noticed Saera and espeak use PortAudio somehow but I don't think they use python. You can use one of hundreds of APIs to record and play audio. I want to record from the microphone, I want to play sounds. Win32_SoundDevice - WMI sample in Python. samplerate = fs sd. The steps are to fetch Python. This is an example videoplayer that uses pygame+pyopengl to render a video. python-qosf has been updated to 1. I need to either 1/ establish a connection with the remote audio source at the system level so the system thinks that audio is coming in via the local microphone jack or 2/ make Python/[PyAudio or sounddevice] see that remote audio stream as the input that is to be read from. There are 3 RGB leds, type APA102, on the card. In this tutorial, you'll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. GitHub Gist: instantly share code, notes, and snippets. import sounddevice as sd import numpy as np fs = 44100 duration = 5 # seconds myrecording = sd. orF problems related to the Python language we redirect you over to Online Python docs. readthedocs. It is actually a little bit tricky to record sound from the microphone with Python. This example shows how to record microphone input, play back the recording, and store the recorded audio signal in a numeric array. An FreeBSD spenden. oss_mixer_device. """ import pyaudio import wave CHUNK = 1024 FORMAT = pyaudio. This page is an index containing a list of Windows Management Instrumentation (WMI) classes with samples in different scripting languages, like: vbscript, jscript, powershell, python, perl. Whirlwind Tour Of Python - fast-paced introduction to Python essentials, aimed at researchers and developers. I am using a LabJack to fire a TTL pulse and then measuring the time it takes for the stimuli to appear on screen (using a Black Box Tool Kit). This sets up a pyaudio. The 2nd example with subprocess. It spans eight seconds in total, but each region of interest is only approximately one second long. Esto es simple y fácil, y puede ver un tutorial al final del post. Windows 7 Help Forums Windows 7 help and support Sound & Audio » Windows 7: How to toggle between default sound device using hotkey. RawStream, sounddevice. """ import pyaudio import wave CHUNK = 1024 FORMAT = pyaudio. Fft On Wav File Python. I can't open it from applications->games->FCEUX NES Emulator or using the alt+f2 run program tool. It will convert audio samples with specified. Although the chroma features and the similarity matrix I obtain seem to be the same as in the example page, the optimal path is completely different (see figure attached). How to install Google assistant on raspberry pi, also known as google home. pythonで音楽再生する方法 主な方法として以下の5つが挙げられます。 を主に記していきます。 また、3. It does work well, but when I do bit heavier calculation simultaneously, the streams become. Python 3 efficiencies in terms of programmer time come in more efficient syntax. 0 most of our Kernels got updated mor…. They are extracted from open source Python projects. 这套控件陆陆续续完善了四年多,目前共142个控件,除了十几个控件参考网友开源的代码写的,其余全部原创,在发布之初就有打算将动态库开放出来永久免费使用,在控件比较完善的今天抽了半天时间编译了多个qt版本的动态库,和头文件一起打包放在百度网盘。. Below is the package information used to build the Python 2. Sign up! By clicking "Sign up!". Record streams - Data flows from the server to the client. inner¶ numpy. Note that in addition to the pastream library , pastream includes a command line application for playing and recording audio files. pi * 440 * t ), 44100 ). Whirlwind Tour Of Python - fast-paced introduction to Python essentials, aimed at researchers and developers. You'll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats. I am using a microphone connected to a raspberry pi with a C-Media Electronics, Inc. All the documentation and examples I've found are for sound devices that are directly attached to the hardware running Python. Here is an example callback function from the test file "patests/patest_saw. Is anyone using sounddevice or PyAudio or PortAudio successfully on sailfish? Can you give my any working example to record audio with python on sailfish? I noticed Saera and espeak use PortAudio somehow but I don't think they use python. import numpy as np. oss_mixer_device. On Linux, you need to install libsndfile using your distribution's package manager, for example sudo apt-get install libsndfile1. Now that most python libraries can be install using pip it's relatively easy to manually install PsychoPy and all it's dependencies to your own installation of Python. The fact-checkers, whose work is more and more important for those who prefer facts over lies, police the line between fact and falsehood on a day-to-day basis, and do a great job. Today, my small contribution is to pass along a very good overview that reflects on one of Trump’s favorite overarching falsehoods. Namely: Trump describes an America in which everything was going down the tubes under  Obama, which is why we needed Trump to make America great again. And he claims that this project has come to fruition, with America setting records for prosperity under his leadership and guidance. “Obama bad; Trump good” is pretty much his analysis in all areas and measurement of U.S. activity, especially economically. Even if this were true, it would reflect poorly on Trump’s character, but it has the added problem of being false, a big lie made up of many small ones. Personally, I don’t assume that all economic measurements directly reflect the leadership of whoever occupies the Oval Office, nor am I smart enough to figure out what causes what in the economy. But the idea that presidents get the credit or the blame for the economy during their tenure is a political fact of life. Trump, in his adorable, immodest mendacity, not only claims credit for everything good that happens in the economy, but tells people, literally and specifically, that they have to vote for him even if they hate him, because without his guidance, their 401(k) accounts “will go down the tubes.” That would be offensive even if it were true, but it is utterly false. The stock market has been on a 10-year run of steady gains that began in 2009, the year Barack Obama was inaugurated. But why would anyone care about that? It’s only an unarguable, stubborn fact. Still, speaking of facts, there are so many measurements and indicators of how the economy is doing, that those not committed to an honest investigation can find evidence for whatever they want to believe. Trump and his most committed followers want to believe that everything was terrible under Barack Obama and great under Trump. That’s baloney. Anyone who believes that believes something false. And a series of charts and graphs published Monday in the Washington Post and explained by Economics Correspondent Heather Long provides the data that tells the tale. The details are complicated. Click through to the link above and you’ll learn much. But the overview is pretty simply this: The U.S. economy had a major meltdown in the last year of the George W. Bush presidency. Again, I’m not smart enough to know how much of this was Bush’s “fault.” But he had been in office for six years when the trouble started. So, if it’s ever reasonable to hold a president accountable for the performance of the economy, the timeline is bad for Bush. GDP growth went negative. Job growth fell sharply and then went negative. Median household income shrank. The Dow Jones Industrial Average dropped by more than 5,000 points! U.S. manufacturing output plunged, as did average home values, as did average hourly wages, as did measures of consumer confidence and most other indicators of economic health. (Backup for that is contained in the Post piece I linked to above.) Barack Obama inherited that mess of falling numbers, which continued during his first year in office, 2009, as he put in place policies designed to turn it around. By 2010, Obama’s second year, pretty much all of the negative numbers had turned positive. By the time Obama was up for reelection in 2012, all of them were headed in the right direction, which is certainly among the reasons voters gave him a second term by a solid (not landslide) margin. Basically, all of those good numbers continued throughout the second Obama term. The U.S. GDP, probably the single best measure of how the economy is doing, grew by 2.9 percent in 2015, which was Obama’s seventh year in office and was the best GDP growth number since before the crash of the late Bush years. GDP growth slowed to 1.6 percent in 2016, which may have been among the indicators that supported Trump’s campaign-year argument that everything was going to hell and only he could fix it. During the first year of Trump, GDP growth grew to 2.4 percent, which is decent but not great and anyway, a reasonable person would acknowledge that — to the degree that economic performance is to the credit or blame of the president — the performance in the first year of a new president is a mixture of the old and new policies. In Trump’s second year, 2018, the GDP grew 2.9 percent, equaling Obama’s best year, and so far in 2019, the growth rate has fallen to 2.1 percent, a mediocre number and a decline for which Trump presumably accepts no responsibility and blames either Nancy Pelosi, Ilhan Omar or, if he can swing it, Barack Obama. I suppose it’s natural for a president to want to take credit for everything good that happens on his (or someday her) watch, but not the blame for anything bad. Trump is more blatant about this than most. If we judge by his bad but remarkably steady approval ratings (today, according to the average maintained by 538.com, it’s 41.9 approval/ 53.7 disapproval) the pretty-good economy is not winning him new supporters, nor is his constant exaggeration of his accomplishments costing him many old ones). I already offered it above, but the full Washington Post workup of these numbers, and commentary/explanation by economics correspondent Heather Long, are here. On a related matter, if you care about what used to be called fiscal conservatism, which is the belief that federal debt and deficit matter, here’s a New York Times analysis, based on Congressional Budget Office data, suggesting that the annual budget deficit (that’s the amount the government borrows every year reflecting that amount by which federal spending exceeds revenues) which fell steadily during the Obama years, from a peak of $1.4 trillion at the beginning of the Obama administration, to $585 billion in 2016 (Obama’s last year in office), will be back up to $960 billion this fiscal year, and back over $1 trillion in 2020. (Here’s the New York Times piece detailing those numbers.) Trump is currently floating various tax cuts for the rich and the poor that will presumably worsen those projections, if passed. As the Times piece reported: