-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension of the library for audio #66
Comments
Hi @ankit6979, The But note that a library like imageZMQ cannot continuously stream audio. What Blob sizes can be quite large, but should be kept smaller than about 500MB due to ZMQ internal limits. Here are some rough sizes of some common examples for size comparisons:
So imageZMQ can definitely send audio clips, but cannot do continuous audio streaming. Here is example of a modified version of # use either of the formats below to specify the address of receiving computer
sender = imagezmq.ImageSender(connect_to='tcp://jeff-macbook:5555')
# sender = imagezmq.ImageSender(connect_to='tcp://192.168.1.190:5555')
# this simple example assumes the song files are in the current directory
# 4 songs by The Eagles...you might like something else ;-)
song_files_list = ['take_it_easy.mp3', 'hotel_california.mp3', 'desperado.mp3', 'tequila_sunrise.mp3']
for song_name in song_files_list:
# song_name is a string; open the mp3 file with that name and read it as binary blob
song_file = open(song_name, 'rb') # open song file as read, binary
audio_clip_blob = song_file.read() # reads the song file as a binary blob
# send the song file name as the text part of tuple; send the audio clip as the binary blob part of the tuple
OK_msg = sender.send_jpg(song_name, audio_clip_blob) You would modify the I have used imageZMQ to send audio clips this way and it works well. I used it for "query" / "response" audio clips for an audio bot agent. But those are distinct (relatively small) audio clips, not continuous audio streaming. I should probably update the documentation with some of this audio info and add some audio examples to the Jeff |
Hi @jeffbass ,
Can the current library be extended to transfer audio feeds as well.
The text was updated successfully, but these errors were encountered: