Giter VIP home page Giter VIP logo

python_audio's Introduction

python_audio

This repository will have my python audio coded

Python modules you need

sudo -H pip3 install sounddevice
sudo -H pip3 install soundfile

Find out what audio interface is avalabale

sudo python3 -m sounddevice
0 HDA Intel PCH: ALC3246 Analog (hw:0,0), ALSA (2 in, 0 out)
< 1 HDA Intel PCH: HDMI 0 (hw:0,3), ALSA (0 in, 8 out)
2 HDA Intel PCH: HDMI 1 (hw:0,7), ALSA (0 in, 8 out)
3 HDA Intel PCH: HDMI 2 (hw:0,8), ALSA (0 in, 8 out)
4 HDA Intel PCH: HDMI 3 (hw:0,9), ALSA (0 in, 8 out)
5 HDA Intel PCH: HDMI 4 (hw:0,10), ALSA (0 in, 8 out)
6 sysdefault, ALSA (128 in, 0 out)
7 hdmi, ALSA (0 in, 8 out)
8 samplerate, ALSA (128 in, 0 out)
9 speexrate, ALSA (128 in, 0 out)
10 upmix, ALSA (8 in, 0 out)
11 vdownmix, ALSA (6 in, 0 out)

12 default, ALSA (128 in, 0 out)

0 HDA Intel PCH: ALC3246 Analog (hw:0,0), ALSA (2 in, 0 out)

Playing 1khz tone to specker devce (0 and 6 should work as seen above)

sudo python3 play_sound_file.py 1kHz_44100Hz_16bit_05sec.wav -d 0

Testing sending mic input to soundcard

sudo python3 ./wire.py -i 0 -o 0 -s48000 -c1
or try
sudo python3 ./wire.py -i 6 -o 6 -s44000 -c1
You should here feedback on specker from microphone change -i and -o to your interface
optional arguments:
-h, --help show this help message and exit
-i INPUT_DEVICE, --input-device INPUT_DEVICE
input device ID or substring
-o OUTPUT_DEVICE, --output-device OUTPUT_DEVICE
output device ID or substring
-c CHANNELS, --channels CHANNELS
number of channels
-t DTYPE, --dtype DTYPE
audio data type
-s SAMPLERATE, --samplerate SAMPLERATE
sampling rate
-b BLOCKSIZE, --blocksize BLOCKSIZE
block size
-l LATENCY, --latency LATENCY
latency in seconds

python_audio's People

Contributors

antonjan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.