Integration of Speech Codec Enhancement Methods into the Opus Codec
Internet-Draft draft-buethe-opus-speech-coding-enhancement-02
Jan, Ed.
Amazon
DE
jbuethe@amazon.com
Jean-Marc
Xiph.Org Foundation
CA
jmvalin@jmvalin.ca
2024
Applications and Real-Time
Internet Engineering Task Force
Opus, RFC6716
This document proposes a method for integrating a speech codec enhancement method into the Opus codec [RFC6716]
Introduction
Since the specification of the original Opus codec [RFC6716] new data-driven speech codec enhancement methods emerged which outperform classical enhancement methods by a large margin. This document proposes a method to integrate such enhancement methods into the Opus decoder including a set of requirements that ensure
1. consistent performance of the enhancement method itself,
2. preservation of decoder performance (e.g. seamless mode switching), and
3. preservation of basic interoperability when tuning the Opus encoder for use with the enhanced decoder.
The document furthermore contains a description of the linear-adaptive coding enhancer (LACE) and its integration into the Opus decoder as an illustrative example.
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
An Illustrative Example
We use the linear-adaptive coding enhancer (LACE) [lace-paper] as an illustrative example to highlight the specific challenges of integrating a speech codec enhancement method into the Opus decoder. LACE is trained to enhance the output signal of the SILK decoder, the speech coding mode of Opus, and Figure 1 depicts a high-level overview of the Opus decoder with LACE added as an enhancement model.
The first requirement for a speech coding enhancement method concerns the performance of the method itself. In this example it relates to the question how the SILK decoder output compares to the LACE output. In [lace-paper] this has been evaluated on clean speech samples using a P.808 listening test as well as the objective method PESQ, which showed consistent improvement for all tested bitrates. For a general enhancement method it will be necessary to specify testing material and performance criteria to prevent unintended quality degradation of the Opus codec.
The second requirement concerns performance of the Opus decoder as a whole. Depending on the bitstream the decoder may have to perform mode switching, e.g. between SILK and CELT, or it may combine the SILK and CELT outputs when the codec operates in hybrid mode. Changes to the SILK output signal by an enhancement method, such as added delay, phase shifts, or level alterations can therefore negatively impact the performance of the Opus decoder even if the first requirement is met. LACE solves this problem by adding no delay and by being approximately phase and level preserving. However, since many enhancement methods are non causal and non phase preserving, these requirements may be too strict for a general enhancement method.
The third requirement concerns interoperability. The Opus specification provides significant freedom for tuning the encoder and the presence of an enhancement method in the decoder may change the optimal encoding choices significantly. In the present example encoding e.g. wideband content at 6 kb/s still leads to fair-to-good quality when using then LACE-enhanced decoder while the quality of a legacy decoder is significantly worse. To make full use of these new enhancement methods such encoder tunings should be allowed but basic interoperability with legacy decoders or other enhanced decoders needs to be ensured.
A simplified Opus decoder diagram including LACE as enhancement module

                 ┌──────────────────────────────┐
                 │           Bitstream          │
                 └─────┬──────────────────┬─────┘
                       │                  │
                       ▼                  ▼
                 ┌───────────┐      ┌───────────┐
                 │   CELT    │      │   SILK    │
                 │  decoder  │      │  decoder  │
                 └─────┬─────┘      └─────┬─────┘
                       │                  │
                       │                  ▼
                       │            ┌───────────┐
                       │            │   LACE    │
                       │            └─────┬─────┘
                       │                  │
                       │                  ▼
                       │            ┌───────────┐
                       │            │ Resampler │
                       │            └─────┬─────┘
                       │                  │
                       ▼                  ▼
                 ┌──────────────────────────────┐
                 │        Mode Handling         │
                 └──────────────┬───────────────┘
                                │
                                ▼
                         decoded  signal

LACE has meanwhile been superceded by the Non-Linear adaptive coding enhancer (NoLACE) [nolace-paper] which shares all basic properties of LACE outlined above but provides higher quality. This stresses the advantage of specifying requirements for an enhancement method over specifying the method itself.
Requirements for the Enhancement Method
TBD
Requirements for Opus Decoder Integration
TBD
Interoperability
TBD
IANA Considerations
The decoder should be able to signal the presence of an enhancement method to the encoder over SDP. The exact mechanism is TBD and the following options are open for discussion.
1. update audio/opus media type registration [RFC7587] to include a parameter speech_enhancement with possible values 0 and 1
2. assign an extension ID, e.g. 33, from the registry defined in [opus-extension] to implement speech coding enhancment. This has the advantage of a double use, meaning the extension ID can both be used to signal the decoder capability to the encoder and for transmitting side information to guide a speech enhancment method from the encoder to the decoder. However, it needs to be proven that side information is useful.
3. update [opus-extension] to include extension IDs beyond 127 for data-less extensions
Security Considerations
TBD
References
Normative References
[opus-extension]

Extension Formatting for the Opus Codec (draft-valin-opus-extension)
Jean-Marc Valin
April 2023
Informative References
[lace-paper]

LACE: A light-weight, causal Model for enhancing coded Speech through Adaptive Convolutions
J. Buethe
J.-M. Valin
A. Mustafa
2023
[nolace-paper]

NoLACE: Improving Low-Complexity Speech Codec Enhancement Through Adaptive Temporal Shaping
J. Buethe
A. Mustafa
J.-M. Valin
K. Helwani
M. Goodwin
2023
[RFC6716]
[RFC2119]
[RFC8174]
[RFC7587]