ICosyVoiceTokenReward<T>

Interfaces · AiDotNet.TextToSpeech.CodecBased

A differentiable token-domain reward for CosyVoice 3 DiffRO (paper equations 3-7).

Known implementations: CosyVoiceToken2TextReward<T>

How It Works

The reward’s weights remain frozen during policy training, but its input derivatives must be retained. Implementations return a scalar log reward, not a detached numeric score or a waveform reward.

Properties

Property Summary
IReadOnlyList<LayerBase<T>> Layers { get; } The reward’s layers, put in evaluation mode during policy optimization.
int SpeechVocabularySize { get; } The number of acoustic speech-code categories accepted along the last input axis.

Methods

Method Summary
Tensor<T> LogReward(Tensor<T> softSpeechTokens, IReadOnlyList<int> textTokens) Returns the scalar log reward of soft speech tokens [frames, categories] for the target transcript.