<s> import speech_recognition as sr <EOL> r = sr . Recognizer ( ) <EOL> with sr . Microphone ( ) as source : <EOL> print ( "<STR_LIT>" ) <EOL> audio = r . listen ( source ) <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_sphinx ( audio ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_google ( audio ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) <EOL> WIT_AI_KEY = "<STR_LIT>" <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_wit ( audio , key = WIT_AI_KEY ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) <EOL> BING_KEY = "<STR_LIT>" <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_bing ( audio , key = BING_KEY ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) <EOL> API_AI_CLIENT_ACCESS_TOKEN = "<STR_LIT>" <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_api ( audio , client_access_token = API_AI_CLIENT_ACCESS_TOKEN ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) <EOL> IBM_USERNAME = "<STR_LIT>" <EOL> IBM_PASSWORD = "<STR_LIT>" <EOL> try : <EOL> print ( "<STR_LIT>" + r . recognize_ibm ( audio , username = IBM_USERNAME , password = IBM_PASSWORD ) ) <EOL> except sr . UnknownValueError : <EOL> print ( "<STR_LIT>" ) <EOL> except sr . RequestError as e : <EOL> print ( "<STR_LIT>" . format ( e ) ) </s>
