PyAudio 0.2.11+ (required only if you need to use microphone input, Microphone)
def answer(call):
def send_currency_rates(call_data):
if call_data == 'bitcoin':
source = requests.get(url_bitcoin, headers = headers)
html = BeautifulSoup(source.text, 'lxml')
my_bot.send_message(call.message.chat.id, 'Курс Bitcoin: {0}'.format(html.find('span', {'class': 'pid-1057391-last', 'id': 'last_last'}).get_text()))
time.sleep(2)
if call.data == 'bitcoin':
while True:
send_currency_rates(call.data)