You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
788 B
788 B
Socket Send & Receive
This example is loosely built from knowledge gained in reading https://defn.io/2018/02/25/web-app-from-scratch-01/ series.
Why?
I needed a simple way to pipe the contents of a wave file produced by a Text to Speech model to a remote device (raspberrypi).
Usage
The socket_receiver.py
is intended to be a single connection reciever of binary wave files. You
can use sender.py <wave_file_path>
to marshal a .wav
file to the receiver, which immediately plays
back the contents. The reciever then waits for the next connection to repeat the process.
Producing sample clips
I ran into some trouble initially producing a valid .wav
file using Audacity. I did find that a Mono channel, 22050 Hz, file using the signed 16bit PCM
encoding worked.