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

@@ -0,0 +1,34 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2021, Sangoma Technologies Corporation
*
* Kevin Harwell <kharwell@sangoma.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
#ifndef RES_AEAP_TRANSPORT_WEBSOCKET_H
#define RES_AEAP_TRANSPORT_WEBSOCKET_H
/*!
* \brief Asterisk external application protocol websocket transport
*/
struct aeap_transport_websocket;
/*!
* \brief Creates (heap allocated), and initializes a transport websocket
*
* \returns A transport websocket object, or NULL on error
*/
struct aeap_transport_websocket *aeap_transport_websocket_create(void);
#endif /* RES_AEAP_TRANSPORT_WEBSOCKET_H */