Robobo audio streaming library
Project description
robobo-python-audio-stream
This library is required to use the audio streaming from the Smartphone's microphone in the Robobo.py library. It only runs in Android operating system.
Installation
Download this repository to your computer and save it in the robobo.by folder. Then open a terminal window and type the two following commands:
pip install robobopy_audiostream
Example
The following script shows an example of the basic usage of this library:
from robobo_audio.robobo_audio import RoboboAudio
import pyaudio
SERVER_IP = "your_ip_here"
p = pyaudio.PyAudio()
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 1024
stream = p.open(format=FORMAT,
channels=CHANNELS,
rate=RATE,
output=True,
frames_per_buffer=CHUNK)
audio = RoboboAudio(SERVER_IP)
audio.connect()
audio.syncAudioQueue()
while True:
try:
audioData = audio.getAudioWithMetadata()
if not audioData is None:
data, ts, snc = audioData
stream.write(data)
except KeyboardInterrupt:
break
audio.disconnect()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robobopy_audiostream-1.0.0.tar.gz.
File metadata
- Download URL: robobopy_audiostream-1.0.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dca3e61b2d8d5af76c6b0e8ea9e2028b068daf31baa0e20b53ab60fe9f1f26d
|
|
| MD5 |
332b471484369a38f039e057324668cd
|
|
| BLAKE2b-256 |
5368c69625acb775ec4fbecb3b8a0f1f3b454e951bf614bfc1eaa83c616d35a1
|
File details
Details for the file robobopy_audiostream-1.0.0-py3-none-any.whl.
File metadata
- Download URL: robobopy_audiostream-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef6d44410ebbc4321a1d81612ae3c7a2eb67fcc80ea1fff947b502a11a8738c4
|
|
| MD5 |
ef3f6e376219ac2724692f6af923cda2
|
|
| BLAKE2b-256 |
bd969cf0a20ff8799082f6453f5c351f1d6c999ec99caf7d0472f3d5ef950de7
|