Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jm12138 committed Sep 3, 2023
1 parent 8db403b commit 148ca4e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions msc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def asr(

if rsltStatus == MSPRECStatus.MSP_REC_STATUS_COMPLETE:
# Session End
QISRSessionEnd(sessionID, "Normal End.")
QISRSessionEnd(sessionID, b"Normal End.")
break

@staticmethod
Expand All @@ -112,7 +112,7 @@ def tts(params: bytes, text: bytes) -> Generator[bytes, None, None]:

if synthStatus == MSPTTSStatus.MSP_TTS_FLAG_DATA_END:
# Session End
QTTSSessionEnd(sessionID, "Normal End.")
QTTSSessionEnd(sessionID, b"Normal End.")
break

@staticmethod
Expand Down Expand Up @@ -156,6 +156,9 @@ def kws(
audioStatus=MSPAudioSampleStatus.MSP_AUDIO_SAMPLE_LAST,
)

# Session End
QIVWSessionEnd(sessionID, b"Normal End.")

@staticmethod
def ase(
params: bytes, text: bytes, stream: Stream, chunk_size: int = 2048
Expand Down Expand Up @@ -200,7 +203,7 @@ def ase(

if rsltStatus == MSPRECStatus.MSP_REC_STATUS_COMPLETE:
# Session End
QISESessionEnd(sessionID, "Normal End.")
QISESessionEnd(sessionID, b"Normal End.")
break

def __del__(self) -> None:
Expand Down

0 comments on commit 148ca4e

Please sign in to comment.