Skip to content
Snippets Groups Projects
Commit ea8e0430 authored by schle's avatar schle
Browse files

RobinsonSchlesselFinal

parent 7969ac0f
No related branches found
No related tags found
No related merge requests found
# Title: DISVoiceProgram.py
#
# Authors: Captain Matthew Robinson and Captain Max Schlessel
#
# This program is a simple chat program using vidstream and pyaudio.
# Use https://www.lfd.uci.edu/~gohlke/pythonlibs/ to download the
# .whl file for pyaudio and then pip install pyaudio and pip install
# vidstream. Use available ports such as 9999 and 5555 for the sender
# and receiver ports. May also need to disable firewalls and wifi
# security settings to be able to send and receive on such ports.
#
# Resources: https://www.youtube.com/watch?v=ikJZIT4H6Bc
#
# Last updated: 20210915
from vidstream import AudioSender
from vidstream import AudioReceiver
import threading
import socket
ip = socket.gethostbyname(socket.gethostname())
print('Your IP address is:' + ip)
receiverport = int(input('What port would you like to use?'))
senderip = str(input('What is the ip address of the person who you are trying to talk to?'))
senderport = int(input('What is the port of the person who you are trying to talk to?'))
receiver = AudioReceiver(ip, receiverport)
receive_thread = threading.Thread(target=receiver.start_server)
sender = AudioSender(senderip, senderport)
sender_thread = threading.Thread(target=sender.start_stream)
receive_thread.start()
sender_thread.start()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment