in genesyscloud/genesyscloud-audiohook/dialogflow_api.py [0:0]
def maintained_streaming_analyze_content(
self,
audio_stream: Stream,
participant: dialogflow.Participant,
audio_config: dialogflow.InputAudioConfig):
"""While the stream is not closed or terminated, maintain a steady call to streaming
analyze content API endpoint
"""
logging.debug("Call streaming analyze content %s, %s",
audio_stream.closed, audio_stream.is_final)
while not audio_stream.terminate:
# while not audio_stream.is_final and not audio_stream.closed:
while not audio_stream.closed:
self.streaming_analyze_content(
audio_stream,
participant,
audio_config)