Clean some of the prints
This commit is contained in:
parent
554f6a2cc3
commit
596abab9d2
2 changed files with 6 additions and 7 deletions
|
@ -58,7 +58,7 @@ class GoogleVoiceClient(object):
|
|||
self.isRunning.set()
|
||||
|
||||
def generator(self):
|
||||
print('start generator')
|
||||
self.logger.debug('start generator')
|
||||
while not self.toBeShutdown and self.isRunning.is_set():
|
||||
try:
|
||||
# set a timeout, as not to wait infinitely for the buffer when
|
||||
|
@ -66,8 +66,8 @@ class GoogleVoiceClient(object):
|
|||
yield self.buffer.get(timeout=.3)
|
||||
except queue.Empty as e:
|
||||
self.logger.debug('empty mic buffer - restart?')
|
||||
print(self.isRunning.isSet())
|
||||
print('stop generator')
|
||||
# print(self.isRunning.isSet())
|
||||
self.logger.info('stop generator')
|
||||
self.restart = False # don't trigger double restart
|
||||
|
||||
# raise RequireRestart("Restart required (generator)")
|
||||
|
@ -145,7 +145,7 @@ class GoogleVoiceClient(object):
|
|||
self.lastNonFinalTranscript = None
|
||||
|
||||
if result.is_final:
|
||||
print("native final")
|
||||
self.logger.info("native final")
|
||||
msg = {
|
||||
"event": "speech",
|
||||
"is_final": result.is_final,
|
||||
|
|
|
@ -134,7 +134,7 @@ class MSVoiceFetcher(VoiceFetcher):
|
|||
headers=headers,
|
||||
allow_nonstandard_methods=True
|
||||
)
|
||||
print(request.method, request.url, request.headers)
|
||||
logger.debug(f"{request.method} {request.url} {request.headers}")
|
||||
try:
|
||||
response = await http_client.fetch(request)
|
||||
except Exception as e:
|
||||
|
@ -148,7 +148,6 @@ class MSVoiceFetcher(VoiceFetcher):
|
|||
|
||||
async def requestVoiceFile(self, text):
|
||||
|
||||
print(self.config['voice_url'])
|
||||
headers = {
|
||||
'Authorization': 'Bearer ' + await self.getToken(),
|
||||
'Content-Type': 'application/ssml+xml',
|
||||
|
@ -159,7 +158,7 @@ class MSVoiceFetcher(VoiceFetcher):
|
|||
name='{self.config['ms_name']}'>
|
||||
{text}
|
||||
</voice></speak>"""
|
||||
print(headers, body)
|
||||
logger.debug(body)
|
||||
http_client = AsyncHTTPClient()
|
||||
request = HTTPRequest(
|
||||
method="POST",
|
||||
|
|
Loading…
Reference in a new issue