From 444fed1f2a0517a5559571098e0e3442c2ffb747 Mon Sep 17 00:00:00 2001 From: KBA07 Date: Wed, 6 Sep 2023 13:55:25 +0530 Subject: [PATCH] cleanup --- requirements.txt | 1 - run_ci.sh | 34 --------------------- scrap.py | 65 ---------------------------------------- tests/utils/test_file.py | 6 ---- 4 files changed, 106 deletions(-) delete mode 100755 scrap.py diff --git a/requirements.txt b/requirements.txt index a602a2c..4f8c700 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -# gtts==2.3.2 google-cloud-texttospeech==2.14.1 SQLAlchemy==1.3.19 pygame==2.5.1 diff --git a/run_ci.sh b/run_ci.sh index 4646b64..fcc3b19 100755 --- a/run_ci.sh +++ b/run_ci.sh @@ -10,37 +10,3 @@ pip install -r requirements.txt pip install coverage coverage run -m unittest discover -s . -p 'test_*.py' && coverage xml - - -# sudo apt-get install -y libreadline-gplv2-dev -# sudo apt-get install -y build-essential libncursesw5-dev \ -# libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ -# libbz2-dev libffi-dev zlib1g-dev - -# wget https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz -# tar -xzf Python-3.9.2.tgz -# cd Python-3.9.2 -# ./configure -# make -# sudo make install - -# # python3 -c "import platform; print(platform.architecture())" checking python architecture - -# virtualenv ENV -# source ENV/bin/activate -# pip install -r requirements.txt - - -# git clone https://github.com/seasalt-ai/snowboy.git -# cd snowboy/ - -# cd scripts && ./install_swig.sh && cd - # This was failing due to connectivity error - -# sudo rm /bin/swig -# sudo ln -s $PWD/scripts/swig-3.0.10/swig /bin/swig - -# sudo apt-get -y install libatlas-base-dev - -# cd swig/Python3 && make && cd - - -# pip install . diff --git a/scrap.py b/scrap.py deleted file mode 100755 index 4a0fe23..0000000 --- a/scrap.py +++ /dev/null @@ -1,65 +0,0 @@ -from data_api.text_to_speech_dao import TextToSpeechDao -from audio_io.player import Player - - -text = """As an AI, I don't have personal experiences or opinions. However, there are several widely regarded places on Earth for skydiving that offer exceptional experiences. Some of these locations include: - -1. Lake Taupo, New Zealand: Known for its stunning landscapes, Lake Taupo offers breathtaking views of mountains, lakes, and the majestic Huka Falls. - -2. Fox Glacier, New Zealand: Skydiving over Fox Glacier provides an unparalleled experience with panoramic views of the Southern Alps, ice formations, and the Tasman Sea. - -3. Hawaii, USA: Skydiving in Hawaii allows you to enjoy stunning views of the Pacific Ocean, lush greenery, and volcanic landscapes, creating a unique and memorable experience. - -4. Namib Desert, Namibia: Skydiving over the Namib Desert offers a surreal experience with vast sand dunes, the Atlantic coastline, and captivating sunsets. - -5. Interlaken, Switzerland: Nestled in the Swiss Alps, Interlaken provides an unforgettable skydiving experience with breathtaking views of snow-capped mountains, lakes, and picturesque landscapes. - -It is important to research and choose a highly reputable skydiving center that meets safety standards and offers professional instructors to ensure a safe and enjoyable adventure.""" - -text1 = "Sorry, I am having trouble connecting to the servers. Please try again later." -text2= "Sorry, I couldn't understand what you are trying to say. Can you speak again." -if __name__ == "__main__": - out = TextToSpeechDao.synthesize(text1) - TextToSpeechDao.synthesize(text2) - - - - -# if __name__== "__main__": -# # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/) - -# # Parameters for PyAudio -# pa = None -# audio_stream = None -# pa_format = pyaudio.paInt16 -# pa_channels = 1 -# pa_rate = 16000 -# pa_frames_per_buffer = 512 - -# print("Listening... Press Ctrl+C to exit") - -# pa = pyaudio.PyAudio() - -# # Open audio stream -# audio_stream = pa.open( -# rate=pa_rate, -# channels=pa_channels, -# format=pa_format, -# input=True, -# frames_per_buffer=pa_frames_per_buffer, -# ) - -# try: -# while True: -# frames = audio_stream.read(pa_frames_per_buffer) -# if WakeDetector.detect(frames): -# print("jarvis detected") -# print("application logic should be below") -# except KeyboardInterrupt: -# print("Stopping... the application") -# finally: -# if audio_stream is not None: -# audio_stream.close() -# if pa is not None: -# pa.terminate() - diff --git a/tests/utils/test_file.py b/tests/utils/test_file.py index 55cc791..62d5bf3 100755 --- a/tests/utils/test_file.py +++ b/tests/utils/test_file.py @@ -8,12 +8,6 @@ from data_api.sftt_dao import SfttDao from utils.constants import Constants from utils.exceptions import UnsupportedExtenstion -# from utils.file import ( -# generateSpeechFileName, -# getDirectoryforSpeechSave, -# error_response, -# mapInputSpeechToText, -# ) class TestYourModule(unittest.TestCase): def setUp(self):