Skip to content

Commit

Permalink
Address logging review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 8, 2024
1 parent fffef5c commit 391a978
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion neon_hana/app/routers/node_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from typing import Optional, Union

from fastapi import APIRouter, WebSocket, HTTPException
from ovos_utils import LOG
from starlette.websockets import WebSocketDisconnect

from neon_hana.app.dependencies import config, client_manager
Expand Down Expand Up @@ -99,7 +100,7 @@ async def node_v1_stream_endpoint(websocket: WebSocket, token: str):
except WebSocketDisconnect:
disconnect_event.set()
except Exception as e:
print(e)
LOG.error(e)
finally:
client_manager.disconnect_stream()

Expand Down
2 changes: 1 addition & 1 deletion neon_hana/streaming_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def _send_bytes(audio_bytes: bytes):
wav_audio_bytes = b64decode(encoded_audio)
LOG.info(f"Sending {len(wav_audio_bytes)} bytes of audio")
run(_send_bytes(wav_audio_bytes))
LOG.info(f"Sent {i} binary audio response")
LOG.info(f"Sent {i} binary audio response(s)")

def on_chunk(self, chunk: ChunkInfo):
LOG.debug(f"Chunk: {chunk}")
Expand Down

0 comments on commit 391a978

Please sign in to comment.