Skip to content

Commit

Permalink
Merge pull request #15 from karthagokul/beta
Browse files Browse the repository at this point in the history
Code cleanup
  • Loading branch information
karthagokul authored Mar 19, 2023
2 parents e5bf90d + 840b984 commit d9e64ed
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
7 changes: 4 additions & 3 deletions core/emotions_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
The Core Engine
"""

import logging
import text2emotion as te
from time import sleep


class SentiMeterModule:
"""
The base class for all modules to encapsulate the commonality
"""

def __init__(self) -> None:
self.active = False

Expand Down
4 changes: 0 additions & 4 deletions modules/audio_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
from pydub import AudioSegment
from pydub.silence import split_on_silence
from core.sttengine import STTEngine
from threading import Thread
from queue import Queue
from time import sleep
import os
import logging
import os
import speech_recognition as sr
from core.user_interfaces import SentimeterSimpleUI

Expand Down
6 changes: 0 additions & 6 deletions modules/livespeech_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@

import logging
import speech_recognition as sr
import os
from threading import Thread
from queue import Queue
import core.emotions_engine as emotions_engine
import os
from pydub import AudioSegment
from pydub.silence import split_on_silence
from time import sleep
from core.emotions_engine import SentiMeterModule
from core.sttengine import STTEngine
import core.emotions_engine
from core.user_interfaces import SentimeterSimpleUI


Expand Down
10 changes: 0 additions & 10 deletions modules/telegram_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@
"""
Module to run as telegram bot
"""
import logging
import speech_recognition as sr
from threading import Thread
from queue import Queue
import core.emotions_engine as emotions_engine
from core.emotions_engine import EngineObserver
from pydub import AudioSegment
from pydub.silence import split_on_silence
from time import sleep
from core.emotions_engine import SentiMeterModule
from core.sttengine import STTEngine
import core.emotions_engine
from core.user_interfaces import SentimeterSimpleUI
import telebot
import os

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ PyAudio==0.2.13
pycodestyle==2.10.0
pycryptodomex==3.17
pydub==0.25.1
pyflakes==3.0.1
Pygments==2.14.0
pyjsparser==2.7.1
PyQt6==6.4.2
Expand Down
2 changes: 1 addition & 1 deletion sentimeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
)
@click.option("--audio_file", help="Process Audio File")
@click.option("--text_file", help="File to Process")
def main(live, telegrambot, text, audio_file, text_file):
def main(live, telegrambot, audio_file, text_file):
"""The Main function which process the user commands to start the respective modules"""
global app
global module
Expand Down

0 comments on commit d9e64ed

Please sign in to comment.