with sr.Microphone() as source:
        audio = r.adjust_for_ambient_noise(source)
        n = (n + 1)
        print("Say something!")
        audio = r.listen(source)
        # interprete audio (Google Speech Recognition)
    try:
        s = (r.recognize_google(audio))
        message = (s.lower())
        print(message)

        # POLITE JARVIS ============================================================================================================= BRAIN 1

        if ('goodbye') in message:
            rand = ['Goodbye Sir', 'Jarvis powering off in 3, 2, 1, 0']
            speekmodule.speek(rand, n, mixer)
            break

        if ('hello') in message or ('hi') in message:
            rand = [
                'Wellcome to Jarvis virtual intelligence project. At your service sir.'
            ]
            speekmodule.speek(rand, n, mixer)

        if ('thanks') in message or ('tanks') in message or (
                'thank you') in message:
            rand = ['You are wellcome', 'no problem']
            speekmodule.speek(rand, n, mixer)

        if message == ('jarvis'):
            rand = ['Yes Sir?', 'What can I doo for you sir?']
Exemplo n.º 2
0
from mysql.connector import errorcode
import time

doss = os.getcwd()
i = 0
n = 0

while (i < 1):

    try:
        n = n + 1
        throw = [
            'Do you take prescription medications?',
            'Do you take prescription medications?'
        ]
        speekmodule.speek(throw, n, mixer)
        print('Do you take prescription medications')
        r = sr.Recognizer()
        with sr.Microphone() as source:
            audio = r.adjust_for_ambient_noise(source)
            r.energy_threshold += 280
            audio = r.listen(source)

        s = (r.recognize_google(audio))
        message = (s.lower())
        if ('yes') in message or ('ya') in message or ('es') in message or (
                's') in message or ('yeah') in message:
            a = 1
        else:
            a = 0
        print(message)
Exemplo n.º 3
0
        audio = r.adjust_for_ambient_noise(source)
        n=(n+1)     
        print("Say something!")
        audio = r.listen(source)
                                                   # interprete audio (Google Speech Recognition)
    try:
        s = (r.recognize_google(audio))
        message = (s.lower())
        print (message)


# POLITE JARVIS ============================================================================================================= BRAIN 1
    
        if ('goodbye') in message:                          
            rand = ['Goodbye Sir', 'Jarvis powering off in 3, 2, 1, 0']
            speekmodule.speek(rand,n,mixer)
            break
            
        if ('hello') in message or ('hi') in message:
            rand = ['Wellcome to Jarvis virtual intelligence project. At your service sir.']
            speekmodule.speek(rand,n,mixer)

        if ('thanks') in message or ('tanks') in message or ('thank you') in message:
            rand = ['You are wellcome', 'no problem']
            speekmodule.speek(rand,n,mixer)

        if message == ('jarvis'):
            rand = ['Yes Sir?', 'What can I doo for you sir?']
            speekmodule.speek(rand,n,mixer)

        if  ('how are you') in message or ('and you') in message or ('are you okay') in message:
Exemplo n.º 4
0
doss = os.getcwd()
print(doss)
path = str(doss + '\\Musicas')
if not os.path.exists(path):
    os.mkdir(path)
path = doss + '\\Videos'
if not os.path.exists(path):
    os.mkdir(path)
i = 0
n = 0

rand = [
    'Oi mestre, o que posso fazer por você?', 'Olá,em que posso ajudar?',
    'Bem vindo ao Sistema de Inteligência Virtual,...ana falando!!!'
]
speekmodule.speek(rand, n)

INFO = '''
        +=======================================+=======================================+		
        |.......INTELLIGENCE VIRTUAL ANA........|............COMANDOS DE VOZ............|
        |               BASED                   |---------------------------------------|
        |.....JARVISE VIRTUAL INTELLIGENCE......|#bom dia      #boa tarde     #boa noite|
        +---------------------------------------+#olá      #obrigado     #como você está|
        |#Author: Valentin Genard               |#qual o seu nome?  #ana  #você está aí?|
        |#Date: 01/06/2016                      |#abrir facebook    #descansar    #tchau|		
        |#Modified by: Cleiton Leonel Creton    |#música   #site.com    #vídeo     #wifi|
        |#Date: 01/01/2017                      |#conte uma piada      #conte outra     |
        +---------------------------------------+#data      #que horas são     #encerrar|
        |#Changing the Description of this tool |#cima    #baixo    #direita   #esquerda|
        | Won't made you the coder              |#minimizar      #maximizar      #entrar|
        |#I don't take responsability for       |#subindo      #descendo     #silencioso|