#!/usr/bin/env python
import pyaudio
import socket
import sys

# Pyaudio Initialization
chunk = 1024
p = pyaudio.PyAudio()

stream = p.open(format = pyaudio.paInt16,
                channels = 1,
                rate = 10240,
                output = True)

# Socket Initialization
host = ''
port = 5555
backlog = 5
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host,port))
s.listen(backlog)

client, address = s.accept()

# Main Functionality
while 1:
    data = client.recv(size)
    if data:
        # Write data to pyaudio stream
        stream.write(data)  # Stream the recieved audio data
        client.send('ACK')  # Send an ACK

client.close()
stream.close()
p.terminate()

22ef00255f5b9366fcf2802c8af482b8878beeae
<mask token>

<mask token>
s.bind((host, port))
s.listen(backlog)
<mask token>
while 1:
    data = client.recv(size)
    if data:
        stream.write(data)
        client.send('ACK')
client.close()
stream.close()
p.terminate()

<mask token>
chunk = 1024
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=10240, output=True)
host = ''
port = 5555
backlog = 5
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(backlog)
client, address = s.accept()
while 1:
    data = client.recv(size)
    if data:
        stream.write(data)
        client.send('ACK')
client.close()
stream.close()
p.terminate()

import pyaudio
import socket
import sys
chunk = 1024
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=10240, output=True)
host = ''
port = 5555
backlog = 5
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(backlog)
client, address = s.accept()
while 1:
    data = client.recv(size)
    if data:
        stream.write(data)
        client.send('ACK')
client.close()
stream.close()
p.terminate()

#!/usr/bin/env python
import pyaudio
import socket
import sys

# Pyaudio Initialization
chunk = 1024
p = pyaudio.PyAudio()

stream = p.open(format = pyaudio.paInt16,
                channels = 1,
                rate = 10240,
                output = True)

# Socket Initialization
host = ''
port = 5555
backlog = 5
size = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host,port))
s.listen(backlog)

client, address = s.accept()

# Main Functionality
while 1:
    data = client.recv(size)
    if data:
        # Write data to pyaudio stream
        stream.write(data)  # Stream the recieved audio data
        client.send('ACK')  # Send an ACK

client.close()
stream.close()
p.terminate()
