Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Cognigy/SpeechServerPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Speech Server Python

Python example codes to connect to Cognigy speech server. The script spawns an arecord subprocess to access microphone and read the audio chunks. After sending chunks and end the stream, it wait for reply from brain. SocketIO wait will stop after an event come, so currently we listen only for reply from brain.

On connect params

noTTs: only send audio for STT and wait reply from brain. Don't send to TTS since the audio chunk from TTS is not compatible.

Speech Server Events

  • stt_chunk_start - Signal speech server that a new stream started
  • stt_chunk - Send audio chunk to speech server stream
  • stt_chunk_end - Signal speech server that the audio stream has ended

Options

  • servicename: STT service name, either google or watson.
  • sample_rate: optional, speech audio sample rate. Default to 16000
  • language: optional, speech audio spoken language. Default to "en-US"

example:

'{"servicename": "google", "sample_rate": 22000}'

About

Python example codes to connect to Cognigy speech server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages