114114# MTMD_GEN_AUDIO_TYPE_YUE2,
115115# MTMD_GEN_AUDIO_TYPE_MINIMAX_MUSIC3,
116116# MTMD_GEN_AUDIO_TYPE_FISH_S2,
117+ # MTMD_GEN_AUDIO_TYPE_MOSHI,
117118# MTMD_GEN_AUDIO_TYPE_KOKORO,
118119# MTMD_GEN_AUDIO_TYPE_TINY_VOCA,
119120# MTMD_GEN_AUDIO_TYPE_VOXCPM2,
129130MTMD_GEN_AUDIO_TYPE_YUE2 = 8
130131MTMD_GEN_AUDIO_TYPE_MINIMAX_MUSIC3 = 9
131132MTMD_GEN_AUDIO_TYPE_FISH_S2 = 10
132- MTMD_GEN_AUDIO_TYPE_KOKORO = 11
133- MTMD_GEN_AUDIO_TYPE_TINY_VOCA = 12
134- MTMD_GEN_AUDIO_TYPE_VOXCPM2 = 13
133+ MTMD_GEN_AUDIO_TYPE_MOSHI = 11
134+ MTMD_GEN_AUDIO_TYPE_KOKORO = 12
135+ MTMD_GEN_AUDIO_TYPE_TINY_VOCA = 13
136+ MTMD_GEN_AUDIO_TYPE_VOXCPM2 = 14
135137
136138MTMD_GEN_PROCESS_TYPE_GEN_CODE = 0
137139MTMD_GEN_PROCESS_TYPE_GEN_WAV = 1
@@ -342,6 +344,7 @@ class mtmd_gen_audio_info(Structure):
342344# // for MTMD_GEN_PROCESS_TYPE_GEN_WAV
343345# // pass either codes (discrete) or feats (continuous), depending on the pipeline
344346# // lfm3a GEN_CODE also takes codes: the codes revealed so far, -1 for a masked codebook
347+ # // moshi GEN_CODE: code0 is the sampled text token; with codes (all of the frame), only their backbone embedding is built
345348# // zonos3 GEN_WAV: -1 for a residual code not known yet, the frame is decoded without it
346349# // kokoro GEN_WAV takes both: codes are the phoneme tokens, feats is the voice row (256 values) then the backbone state of each token
347350# int32_t * codes;
@@ -750,6 +753,24 @@ class mtmd_helper_gen_audio_inp(Structure):
750753 ]
751754
752755
756+ # struct mtmd_helper_cap {
757+ # bool chat; // false for tts-only models (no chat template) and realtime transcription models (token delay)
758+ #
759+ # // input capabilities
760+ # bool vision;
761+ # bool audio;
762+ # bool video; // built-in decoder only (MTMD_VIDEO), a custom decoder is not counted
763+ #
764+ # // realtime capabilities
765+ # bool audio_stream; // realtime transcription, see mtmd_audio_stream_init()
766+ # bool audio_duplex; // full duplex (e.g. Hibiki): the model speaks while it listens, see the moshi pipeline of mtmd_helper_gen_audio
767+ #
768+ # // output capabilities
769+ # bool text_gen; // false for an audio-only model (tts-only, no chat template)
770+ # bool audio_gen;
771+ # bool audio_gen_spk_ref; // accepts a speaker reference audio for voice cloning
772+ # };
773+ # typedef struct mtmd_helper_cap mtmd_helper_cap;
753774class mtmd_helper_cap (Structure ):
754775 """Capabilities exposed by an MTMD model and its projector."""
755776
@@ -759,6 +780,7 @@ class mtmd_helper_cap(Structure):
759780 audio : bool
760781 video : bool
761782 audio_stream : bool
783+ audio_duplex : bool
762784 text_gen : bool
763785 audio_gen : bool
764786 audio_gen_spk_ref : bool
@@ -769,6 +791,7 @@ class mtmd_helper_cap(Structure):
769791 ("audio" , c_bool ),
770792 ("video" , c_bool ),
771793 ("audio_stream" , c_bool ),
794+ ("audio_duplex" , c_bool ),
772795 ("text_gen" , c_bool ),
773796 ("audio_gen" , c_bool ),
774797 ("audio_gen_spk_ref" , c_bool ),
0 commit comments