def savedLocationsInput(data, repeat=False):
    if (len(data.savedLocations) == 0):
        play('voiceCommands/noSavedDestinations.wav')
    else:
        if (repeat == True):
            play('voiceCommands/sorryPleaseRepeat.wav')
        else:
            play('voiceCommands/destinationInputPromptWithHelp.wav')
        userInput = recognizeSpeech('savedDest')
        if (userInput == 'help'):
            play('voiceCommands/modeSelectionHelp.wav')
            userInput = recognizeSpeech('savedDest')
        if (userInput in data.savedLocations):
            return userInput
        else:
            return savedLocationsInput(data, True)
def savedLocationsInput(data, repeat=False):
    if (len(data.savedLocations) == 0):
        play('voiceCommands/noSavedDestinations.wav')
    else:
        if (repeat == True):
            play('voiceCommands/sorryPleaseRepeat.wav')
        else:
            play('voiceCommands/destinationInputPromptWithHelp.wav')
        userInput = recognizeSpeech('savedDest')
        if (userInput == 'help'):
            play('voiceCommands/modeSelectionHelp.wav')
            userInput = recognizeSpeech('savedDest')
        if (userInput in data.savedLocations):
            return userInput
        else:
            return savedLocationsInput(data, True)