res_aeap & res_speech_aeap: Add Asterisk External Application Protocol

Add framework to connect to, and read and write protocol based
messages from and to an external application using an Asterisk
External Application Protocol (AEAP). This has been divided into
several abstractions:

 1. transport - base communication layer (currently websocket only)
 2. message - AEAP description and data (currently JSON only)
 3. transaction - links/binds requests and responses
 4. aeap - transport, message, and transaction handler/manager

This patch also adds an AEAP implementation for speech to text.
Existing speech API callbacks for speech to text have been completed
making it possible for Asterisk to connect to a configured external
translator service and provide audio for STT. Results can also be
received from the external translator, and made available as speech
results in Asterisk.

Unit tests have also been created that test the AEAP framework, and
also the speech to text implementation.

ASTERISK-29726 #close

Change-Id: Iaa4b259f84aa63501e5fd2a6fb107f900b4d4ed2
This commit is contained in:
Kevin Harwell
2021-06-18 12:54:10 -05:00
committed by Friendly Automation
parent 53a3af6321
commit 272bac70dd
25 changed files with 4831 additions and 57 deletions

View File

@@ -2,14 +2,20 @@
; This file is used by the res_aeap module to configure parameters
; used for AEAP applications.
;
;[myserver]
;[myclient]
;
; type must be "server".
;type=server
; type must be "client".
;type=client
;
; server_url must be a websocket URL (ws or wss).
;server_url
; URL used to connect to a server. It must be a websocket URL (ws or wss).
;url=ws://127.0.0.1:9099
;
; codecs is an optional list of codecs that will be used over the codecs
; specified on an endpoint if this option is present.
;codecs=ulaw,alaw,g722,opus
; codecs is comma separated string of allowed/disallowed codec names.
;codecs=!all,ulaw,alaw,opus
;
; protocol is the implementation specific sub-protocol
;protocol=speech_to_text
;
; "@" parameters can be specified and are used to to set custom values to
; be passed as "params" in the initial "setup" request.
;@language=en-US