Internet Engineering Task Force Q. Xie, Motorola Audio Video Transport WG D. Pearce, Motorola INTERNET-DRAFT S. Balasuriya, Motorola Y. Kim, VerbalTek S. H. Maes, IBM Hari Garudadri, Qualcomm Expires in six months Feb. 20, 2002 RTP Payload Format for Distributed Speech Recognition Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of [RFC2026]. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet- Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. 1. Abstract This document specifies an RTP payload format for encapsulating front-end signal processing feature streams for distributed speech recognition (DSR) systems. The ETSI Standard ES 201 108 front-end is defined as the default codec in this document. 2. Conventions and acronyms The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. The following acronyms are used in this document: DSR - Distributed Speech Recognition ETSI - the European Telecommunications Standards Institute FP - Frame Pair DTX - Discontinuous Transmission 3. Introduction Motivated by technology advances in the field of speech recognition, voice interfaces to services (such as airline information systems, unified messaging) are becoming more prevalent. In parallel, the popularity of mobile devices has also increased dramatically. However, the voice codecs typically employed in mobile devices were designed to optimize audible voice quality and not speech recognition accuracy, and using these codecs with speech recognizers can result in poor recognition performance. For systems that can be accessed from heterogeneous networks using multiple speech codecs, recognition system designers are further challenged to accommodate the characteristics of these differences in a robust manner. Channel errors and lost data packets in these networks result in further degradation of the speech signal. In traditional systems as described above, the entire speech recognizer lies on the server. It is forced to use incoming speech in whatever condition it arrives after the network decodes the vocoded speech. To address this problem, we use a distributed speech recognition architecture. In such a system, the remote device acts as a thin client, also known as the front-end, in communication with a speech recognition server, also called a speech engine. The remote device processes the speech, compresses the data, and adds error protection to the bitstream in a manner optimal for speech recognition. The speech engine then uses this representation directly, minimizing the signal processing necessary and benefiting from enhanced error concealment. To achieve interoperability with different client devices and speech engines, a common format is needed. Within the "Aurora" DSR working group of the European Telecommunications Standards Institute (ETSI), a payload has been defined and was published as a standard [ES201108] in February 2000. For voice dialogues between a caller and a voice service, low latency is a high priority along with accurate speech recognition. While jitter in the speech recognizer input is not particularly important, many issues related to speech interaction over an IP-based connection are still relevant. Therefore, it is desirable to use the DSR payload in an RTP-based session. 3.1 Typical scenarios for using DSR payload format The diagrams in Figure 1 show some typical use scenarios of the DSR RTP payload format. +--------+ +----------+ |IP USER | IP/UDP/RTP/DSR |IP SPEECH | |TERMINAL|-------------------->| ENGINE | | | | | +--------+ +----------+ a) IP user terminal to IP speech engine +--------+ DSR over +-------+ +----------+ | Non-IP | Circuit link | | IP/UDP/RTP/DSR |IP SPEECH | | USER |:::::::::::::::>|GATEWAY|--------------->| ENGINE | |TERMINAL| ETSI payload | | | | +--------+ format +-------+ +----------+ b) non-IP user terminal to IP speech engine via a gateway +--------+ +-------+ DSR over +----------+ |IP USER | IP/UDP/RTP/DSR | | circuit link | Non-IP | |TERMINAL|----------------->|GATEWAY|::::::::::::::::>| SPEECH | | | | | ETSI payload | ENGINE | +--------+ +-------+ format +----------+ c) IP user terminal to non-IP speech engine via a gateway Figure 1: Typical Scenarios for Using DSR Payload Format. For the different scenarios in Figure 1, the speech recognizer always resides in the speech engine. A DSR front-end encoder inside the User Terminal performs front-end speech processing and sends the resultant data to the speech engine in the form of "frame pairs" (FPs). Each FP normally contains two sets of encoded speech vectors representing 20ms of original speech. 4. DSR RTP payload format A DSR RTP payload datagram consists of a standard RTP header [RFC1889] followed by a DSR payload. The DSR payload itself is formed by concatenating a series of DSR FPs. The size and format of the DSR FP may vary from one front-end type to another. Each DSR payload MUST be octet-aligned at the end, i.e., if a DSR payload does not end on an octet boundary, it then MUST be padded at the end with zeros to the next octet boundary. The following example shows a DSR RTP datagram carrying a DSR payload containing three 92-bit-long FPs: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / RTP header in [RFC1889] / \ \ +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | | + + | FP #1 (92 bits) | + +-+-+-+-+ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + + | FP #2 (92 bits) | + +-+-+-+-+-+-+-+-+ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + FP #3 (92 bits) + | | + +-+-+-+-+-+-+-+-+-+-+-+-+ | |0|0|0|0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2. An example of a DSR RTP payload. In this example, the DSR payload is shown with 4 zeros padded at the end to make it octet-aligned. 4.1. Consideration on number of FPs in each RTP package The number of FPs per payload packet should be determined by the latency and bandwidth requirements of the DSR application using this payload format. In particular, using a smaller number of FPs per payload packet in a session will result in lowered bandwidth efficiency due to the RTP/UDP/IP header overhead, while using a larger number of FPs per packet will cause longer end-to-end delay and hence bigger recognition latency. Furthermore, carrying a larger number of FPs per packet will increase the possibility of catastrophic packet loss; the loss of a large number of consecutive FPs is a situation most speech recognizers have difficult to deal with. It is therefore RECOMMENDED that the number of FPs per DSR payload packet be minimized, subject to meeting the application's requirements on network bandwidth efficiency. RTP header compression techniques, such as those defined in [RFC2508] and [RFC3095], SHOULD be considered to improve network bandwidth efficiency. 4.2. Front-end type and FP format Depending on the type of the DSR front-end encoder to be used in the session, the size and format of the FP may be different. When establishing a DSR RTP session, the user terminal and speech engine need first to communicate and agree with each other the type of front-end encoder to use for the upcoming session. This communication can be done using, for example, SDP [RFC2327] with the front-end-type MIME parameter as defined in Section 7, or other out-of-band means of signaling. In this memo, we define only the FP formats that MUST be used when the ESTI ES 201 108 Front-end Codec [ES201108] is used. FP formats for future DSR front-end codecs may be defined in separate IETF documents. 4.3. Support for discontinuous transmission The DSR RTP payloads may be used to support discontinuous transmission (DTX) of speech, which allows that DSR FPs are sent only when speech has been detected at the terminal equipment. In DTX a set of DSR frames coding an unbroken speech segment transmitted from the terminal to the server is called a transmission segment. A DSR frame inside such a transmission segment can be either a speech frame or a non-speech frame, depending on the nature of the section of the speech signal it represents. The end of a transmission segment is determined at the sending end equipment when the number of consecutive non-speech frames exceeds a pre-set threshold, called the hangover time. A typical value used for the hangover time is 1.5 seconds. After all FPs in a transmission segment are sent, the front-end SHOULD indicate the end of the current transmission segment by sending one or more Null FPs (defined in Section 5.1.2). 5. Payload format for ETSI ES 201 108 front-end codec The ETSI Standard ES 201 108 for DSR [ES201108] defines a signal processing front-end and compression scheme for speech input to a speech recognition system. Some relevant characteristics of this ETSI DSR front-end codec are summarized below. The coding algorithm, a standard mel-cepstral technique common to many speech recognition systems, supports three raw sampling rates: 8 kHz, 11 kHz, and 16 kHz. The mel-cepstral calculation is a frame-based scheme that produces an output vector every 10 ms. After calculation of the mel-cepstral representation, the representation is first quantized via split-vector quantization to reduce the data rate of the encoded stream. Then, the quantized vectors from two consecutive frames are put into a FP, as described in more detail in Section 5.2. 5.1. Frame Pair Formats 5.1.1 Format of Speech and Non-speech FPs For the ES 201 108 front-end codec, the following mel-cepstral frame MUST be used, as defined in [ES201108]: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | idx(0,1) | idx(2,3) | idx(4,5) | idx(6,7) | idx(8,9) |idx +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (10,11) | idx(12,13) | +-+-+-+-+-+-+-+-+-+-+-+-+ The length of a frame is 44 bits representing 10ms of voice. As defined in [ES201108], pairs of the quantized 10ms mel-cepstral frames MUST be grouped together and protected with a 4-bit CRC, forming a 92-bit long FP: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Frame #1 (44 bits) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | Frame #2 (44 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ | | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Therefore, each FP represents 20ms of original speech. The 4-bit CRC MUST be calculated using the formula defined in 6.2.4 in [ES201108]. 5.1.2 Format of Null FP A Null FP for the ES 201 108 front-end codec is defined by setting the content of the first and second frame in the FP to null (i.e., filling the first 88 bits of the FP with 0's). The 4-bit CRC MUST be calculated the same way as described in 6.2.4 in [ES201108]. 5.2. RTP header usage The format of the RTP header is specified in [RFC1889]. This payload format uses the fields of the header in a manner consistent with that specification. The RTP timestamp corresponds to the sampling instant of the first sample encoded for the first FP in the packet. The timestamp clock frequency is the same as the sampling frequency, so the timestamp unit is in samples. When ES 201 108 front-end codec is used, the duration of one FP is 20 ms, corresponding to 160, 220, or 320 encoded samples with sampling rate of 8, 11, or 16 kHz being used at the front-end, respectively. Thus, the timestamp is increased by 160, 220, or 320 for each consecutive FP, respectively. The payload is always made an integral number of octets long by padding with zero bits if necessary. If additional padding is required to bring the payload length to a larger multiple of octets or for some other purpose, then the P bit in the RTP in the header may be set and padding appended as specified in [RFC1889]. The RTP header marker bit (M) is not used in this payload and thus SHOULD be set to 0 in all packets by the sender and ignored by the receiver. The assignment of an RTP payload type for this new packet format is outside the scope of this document, and will not be specified here. It is expected that the RTP profile under which this payload format is being used will assign a payload type for this encoding or specify that the payload type is to be bound dynamically. 6. DSR MIME Type Registration Media Type name: audio Media subtype name: DSR Required parameters: none Optional parameters for RTP mode: rate: Indicates the sample rate of the speech. Valid values include: 8k, 11k, and 16k. If this parameter is not present, 8k sample rate is assumed. front-end-type: Indicates the type of the front-end codec to be used for this DSR session. Valid values are: etsi_mfcc - indicates that ETSI ES 201 108 front-end codec as defined in [ES201108] is used. unspecified - indicates that another front-end codec is used. If this parameter is absent, ETSI ES 201 108 front-end is assumed. maxptime: The maximum amount of media which can be encapsulated in each packet, expressed as time in milliseconds. The time shall be calculated as the sum of the time the media present in the packet represents. The time SHOULD be a multiple of the frame pair size (i.e., one FP <-> 20ms). If this parameter is not present, maxptime is assumed to be 60ms. Encoding considerations : This type is defined for transfer via RTP [RFC 1889] as described in Section 5 of RFC XXXX. Audio data is binary data, and must be encoded for non-binary transport; the Base64 encoding is suitable for Email. Security considerations : See Section 7 of RFC XXXX. Person & email address to contact for further information: qxie1@email.mot.com Intended usage: COMMON. It is expected that many VoIP applications (as well as mobile applications) will use this type. Author/Change controller: qxie1@email.mot.com IETF Audio/Video transport working group 7. Security Considerations Implementations using the payload defined in this specification are subject to the security considerations discussed in the RTP specification [RFC1889] and the RTP profile [RFC1890new]. This payload does not specify any different security services. 8. Acknowledgments The design presented here benefits greatly from an earlier work on DSR RTP payload design by Jeff Meunier and Priscilla Walther. The authors also wish to thank Brian Eberman, John Lazzaro, Rainu Pierce, Priscilla Walther, and others for their review and valuable comments on this document. 9. References [ES201108] European Telecommunications Standards Institute (ETSI) Standard ES 201 108, "Speech Processing, Transmission and Quality Aspects (STQ); Distributed Speech Recognition; Front-end Feature Extraction Algorithm; Compression Algorithms," Ver. 1.1.2, April 11, 2000. http://webapp.etsi.org/pda/home.asp?wki_id=9948 [RFC1889] H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson, "RTP: A transport protocol for real-time applications," Internet Draft, Internet Engineering Task Force, Feb. 1999 Work in progress, revision to RFC 1889. [RFC2016] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997 9.1. Informative References [RFC1890new] H. Schulzrinne and S. Casner, "RTP Profile for Audio and Video Conferences with Minimal Control," Internet Draft draft-ietf-avt-profile-new-12.txt, Work in Progress November 21, 2000, revision to RFC 1890. [RFC2327] M. Handley and V. Jacobson, "SDP: Session Description Protocol", IETF RFC 2327, April 1998 [RFC2508] S. Casner and V. Jacobson, "Compressing IP/UDP/RTP Headers for Low-Speed Serial Links," RFC 2508, February 1999. [RFC3095] C. Bormann, C. Burmeister, M. Degermark, H. Fukushima, H. Hannu, L-E. Jonsson, R. Hakenberg, T. Koren, K. Le, Z. Liu, A. Martensson, A. Miyazaki, K. Svanbro, T. Wiebke, T. Yoshimura, and H. Zheng, "RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed," IETF RFC 3095, July 2001. 10. Author's Addresses Qiaobing Xie Tel: +1-847-632-3028 Motorola, Inc. EMail: qxie1@email.mot.com 1501 W. Shure Drive, 2-F9 Arlington Heights, IL 60004, USA David Pearce Tel: +44 (0)1256 484 436 Motorola Labs EMail: bdp003@motorola.com UK Research Laboratory Jays Close Viables Industrial Estate Basingstoke, HANTS, RG22 4PD Senaka Balasuriya Tel: +1-630-353-8347 Motorola, Inc. EMail: Senaka.Balasuriya@motorola.com 1411 Opus Place, Suite 350 Downers Grover, IL 60515, USA Yoon Kim Tel: +1-408-768-4974 VerbalTek, Inc. EMail: yoonie@verbaltek.com 2921 Copper Rd. Santa Clara, CA 95051 Stephane H. Maes Tel: +1-914-945-2908 IBM EMail: smaes@us.ibm.com TJ Watson Research Center P.O. Box 218, Yorktown Heights, NY 10598, USA. Hari Garudadri Tel: Qualcomm EMail: hgarudad@qualcomm.com This Internet Draft expires in 6 months from Feb. 20, 2002.