{"id":262159,"date":"2015-07-23T21:09:02","date_gmt":"2015-07-23T17:09:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=262159"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=262159","title":{"rendered":"\u0413\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0438 Python"},"content":{"rendered":"<p>             \u041d\u0430\u0447\u0438\u0442\u0430\u0432\u0448\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432 \u043e Google Voice \u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0435. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c. \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u041e\u0421 \u2014 Windows.<\/p>\n<h5>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/h5>\n<p>   \u2014 Python 2.7<br \/>   \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<br \/>   <a href=\"http:\/\/people.csail.mit.edu\/hubert\/pyaudio\/\">pyaudio<\/a><br \/>   <a href=\"http:\/\/pycurl.sourceforge.net\/\">pycurl<\/a><br \/>   <a href=\"http:\/\/pywin32.sourceforge.net\/\">pywin32<\/a><br \/>   + \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<br \/>   \u2014 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 flac \u0438 wav, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"http:\/\/www.coolutils.com\/ru\/totalaudioconverter\">\u044d\u0442\u043e\u0442<\/a>.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h5>\n<p>  \u041c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c Google Voice-\u0443, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435:<br \/>  {\u00abstatus\u00bb:0,\u00abid\u00bb:\u00ab5e34348f2887c7a3cc27dc3695ab4575-1\u00bb,\u00abhypotheses\u00bb:[{\u00abutterance\u00bb:\u00ab\u043f\u0440\u0438\u043c\u0435\u0440\u00bb,\u00abconfidence\u00bb:0.7581704}]}, <br \/>  \u0438 \u0434\u0430\u043b\u0435\u0435 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c, \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u00ab\u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c\u00bb, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e-\u0436\u0435 Google Voice.<\/p>\n<h5>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c<\/h5>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre><code class=\"python\">import time, pyaudio, wave, os, urllib,urllib2,pycurl,httplib,sys,win32api,win32con,string from ctypes import * <\/code><\/pre>\n<p>  \u041e\u043a\u0435\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e Talk, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">def Talk(text):    def downloadFile(url, fileName):     fp = open(fileName, &quot;wb&quot;)     curl = pycurl.Curl()     curl.setopt(pycurl.URL, url)     curl.setopt(pycurl.WRITEDATA, fp)     curl.perform()     curl.close()     fp.close()   def getGoogleSpeechURL(phrase):     googleTranslateURL = &quot;http:\/\/translate.google.com\/translate_tts?tl=en&&quot;     parameters = {'q': phrase}     data = urllib.urlencode(parameters)     googleTranslateURL = &quot;%s%s&quot; % (googleTranslateURL,data)     return googleTranslateURL   def speakSpeechFromText(phrase):     googleSpeechURL = getGoogleSpeechURL(phrase)     downloadFile(googleSpeechURL,&quot;ans.mp3&quot;)#\u0444\u0430\u0439\u043b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c ans.mp3    speakSpeechFromText(text)   #\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u0434\u0435\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0447\u044c   winmm = windll.winmm  winmm.mciSendStringA('Open &quot;ans.mp3&quot; Type MPEGVideo Alias theMP3',0,0,0)  winmm.mciSendStringA('Play theMP3 Wait',0,0,0)  winmm.mciSendStringA(&quot;Close theMP3&quot;,&quot;&quot;,0,0) <\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e Talk(text), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u00ab\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u00bb \u043d\u0430\u043c text.<br \/>  \u041a\u043e\u0434\u0435\u043a\u0438 \u0431\u044b\u043b\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043c\u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 mp3 \u0438\u0437 Python.<\/p>\n<p>  \u0410\u0445, \u0434\u0430, \u0435\u0449\u0435 Google \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c (\u0438 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0433\u043b.), \u0442.\u043a \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c Python \u0438 utf-8.<\/p>\n<h5>\u0417\u0430\u043f\u0438\u0441\u044c<\/h5>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c Google. \u0421\u043c\u0435\u043b\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043c:<\/p>\n<pre><code class=\"python\">def Record():     CHUNK = 1024     FORMAT = pyaudio.paInt16     CHANNELS = 2     RATE = 16000     RECORD_SECONDS = 5     WAVE_OUTPUT_FILENAME = &quot;output.wav&quot;      p = pyaudio.PyAudio()      stream = p.open(format=FORMAT,                 channels=CHANNELS,                 rate=RATE,                 input=True,                 frames_per_buffer=CHUNK)      print(&quot;Recording...&quot;)      frames = []      for i in range(0, int(RATE \/ CHUNK * RECORD_SECONDS)):         data = stream.read(CHUNK)         frames.append(data)      print(&quot;Done recording.&quot;)      stream.stop_stream()     stream.close()     p.terminate()      wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')     wf.setnchannels(CHANNELS)     wf.setsampwidth(p.get_sample_size(FORMAT))     wf.setframerate(RATE)     wf.writeframes(b''.join(frames))     wf.close() <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 pyaudio \u0438 \u044f \u0435\u0433\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041d\u043e, \u0432\u043e\u0442 \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0444\u0430\u0439\u043b wav, \u0430 Google \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 flac\u2026 \u041d\u0435\u043f\u043e\u0440\u044f\u0434\u043e\u043a.<br \/>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0432\u044b\u0440\u0443\u0447\u0438\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0435\u0442\u0435\u0440 \u0438 \u043c\u043e\u0434\u0443\u043b\u044c os:<\/p>\n<pre><code class=\"python\">def Convert():     print &quot;Converting&quot;     os.system('C:\\Users\\\u0415\u0433\u043e\u0440\\Desktop\\\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\\TotalAudioConverter\\AudioConverter.exe C:\\Users\\\u0415\u0433\u043e\u0440\\Desktop\\\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\\output.wav C:\\Users\\\u0415\u0433\u043e\u0440\\Desktop\\\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\\output.flac')     print &quot;Done&quot; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u044f\u0441\u043d\u044e, \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b, \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 (\u043f\u0443\u0442\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e).<\/p>\n<h5>\u041f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/h5>\n<p>  <\/p>\n<pre><code class=\"python\">def Send():     global ANSWER     url = 'https:\/\/www.google.com\/speech-api\/v1\/recognize?xjerr=1&client=chromium&lang=en-EN'#\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u044f\u0437\u044b\u043a     flac=open('output.flac',&quot;rb&quot;).read()     header = {'Content-Type' : 'audio\/x-flac; rate=16000'}     req = urllib2.Request(url, flac, header)     data = urllib2.urlopen(req)     a = data.read()     ANSWER = eval(a)     if ANSWER['status'] == 5:         print 'Sorry, I do not understand you.'         Talk('Sorry, I do not understand you.')         ANSWER = 0      else:      ANSWER = ANSWER['hypotheses'][0]['utterance']#\u041e\u0442\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u043e \u0447\u0442\u043e google \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u043b(\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0430\u0447\u0435)      print ANSWER     os.remove('C:\\Users\\\u0415\u0433\u043e\u0440\\Desktop\\\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\\output.wav')#\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438     os.remove('C:\\Users\\\u0415\u0433\u043e\u0440\\Desktop\\\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\\output.flac')     return ANSWER <\/code><\/pre>\n<h5>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h5>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0442\u0432\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"python\">def Processing():   global ANSWER  if ANSWER == 0:      return 0  elif 'chrome' in ANSWER.lower():     os.system('C:\\Users\\\u0415\u0433\u043e\u0440\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe')#\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Google Chrome, \u0435\u0441\u043b\u0438 \u043e\u043d \u0443\u0441\u043b\u044b\u0448\u0430\u043b \u0441\u043b\u043e\u0432\u043e chrome)  elif 'skype' in ANSWER.lower():     os.system('C:\\Users\\\u0415\u0433\u043e\u0440\\Downloads\\SkypePortable\\SkypePortable.exe')#\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e   elif 'cd rom' in ANSWER.lower() or\\    'cd-rom' in ANSWER.lower() or\\    'open d' in ANSWER.lower() or\\    'dvd' in ANSWER.lower() or\\    'dvd-rom' in ANSWER.lower() or\\    'dvd rom' in ANSWER.lower() or\\    'cdrom' in ANSWER.lower() or\\    'cd - rom' in ANSWER.lower():     winmm = windll.winmm     winmm.mciSendStringA(&quot;set cdaudio door open&quot;, &quot;&quot;, 0,0)#\u0415\u0441\u043b\u0438 \u0441\u043b\u044b\u0448\u0438\u0442 \u0447\u0442\u043e- \u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 dvd \u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u0442\u043e\u043a \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0434\u0430 <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0435\u0449\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u043e \u0442\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u0434 \u0438 \u044f \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u0434\u0435\u0441\u044c, \u0442.\u043a \u043f\u043e\u043b\u044c\u0437\u0430 \u043e\u0442 \u043d\u0435\u0433\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043d\u043e\u043b\u044e.<\/p>\n<h5>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c<\/h5>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">print 'Hi, what do you want?' Talk('Hi, what do you want?') Record() Convert() print ('Sending...') Send() print 'Done' Processing()  while True:  ANSWER = None  #Talk('Done.')  print 'Do you want something else? (Your command\\No)'  Talk('Do you want something else??')  Record()  Convert()  print 'Sending...'  Send()  print 'Done'   #print ANSWER  if ANSWER == 0:      continue    if ANSWER.lower()== 'no' or\\#\u0415\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438 \u043d\u0435\u0442, \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443     ANSWER.lower()== 'nope' or\\     ANSWER.lower()== 'not' or\\     ANSWER.lower()== 'nay':      break  else:      Processing()  print 'Okay, bye' Talk('Okay, bye') <\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c. \u042f \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043c\u043e\u0433.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.             <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/263423\/\"> http:\/\/habrahabr.ru\/post\/263423\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u041d\u0430\u0447\u0438\u0442\u0430\u0432\u0448\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u0432 \u043e Google Voice \u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0435. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c. \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u041e\u0421 \u2014 Windows.<\/p>\n<h5>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/h5>\n<p>   \u2014 Python 2.7<br \/>   \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<br \/>   <a href=\"http:\/\/people.csail.mit.edu\/hubert\/pyaudio\/\">pyaudio<\/a><br \/>   <a href=\"http:\/\/pycurl.sourceforge.net\/\">pycurl<\/a><br \/>   <a href=\"http:\/\/pywin32.sourceforge.net\/\">pywin32<\/a><br \/>   + \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<br \/>   \u2014 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 flac \u0438 wav, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"http:\/\/www.coolutils.com\/ru\/totalaudioconverter\">\u044d\u0442\u043e\u0442<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-262159","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/262159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262159"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/262159\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}