from src import google_tts
import os
import random
speak_engine = google_tts.Google_TTS()

UHOH_PATH = "wav/uhoh/"
uhoh_files = os.listdir(UHOH_PATH)


def uhoh():
    '''
    This method will play pre-recorded uhoh wav files
    '''
    speak_engine.play_wav(
        UHOH_PATH +
        random.choice(uhoh_files)
    )

SORRY_PATH = "wav/sorry/"
sorry_files = os.listdir(SORRY_PATH)


def sorry():
    '''
    This method will play pre-recorded sorry wav files
    '''
    speak_engine.play_wav(
        SORRY_PATH +
        sorry_files[
            random.randint(
                0,
                len(sorry_files) -
                1)])

SLEEPY_PATH = "wav/sleepy/"
sleepy_files = os.listdir(SLEEPY_PATH)


def sleepy():
    '''
    This method will play pre-recorded sleepy wav files
    '''
    speak_engine.play_wav(
        SLEEPY_PATH +
        sleepy_files[
            random.randint(
                0,
                len(sleepy_files) -
                1)])

@@ -524,87 +524,21 @@
     
-sorry_files%5B%0A            random.randint(%0A                0,%0A                len
+random.choice
 (sor
@@ -546,38 +546,21 @@
 y_files)
- -
 %0A    
-            1)%5D
 )%0A%0ASLEEP
@@ -770,88 +770,21 @@
     
-sleepy_files%5B%0A            random.randint(%0A                0,%0A                len
+random.choice
 (sle
@@ -797,28 +797,11 @@
 les)
- -
 %0A    
-            1)%5D
 )%0A

no need to reimplement random.choice