vap_nod_timing API
maai.models.vap_nod_timing
VapGPT_nod_timing
Bases: Module
Voice Activity Projection with Timing-only nodding prediction.
Same backbone naming as VapGPT_nod (self_attention / cross_attention / va_classifier / vap_head / bc_head), but with a single-output gt_head (merged nod occurrence, sigmoid) instead of VapGPT_nod's 4-way softmax gt_head. This matches the Timing-stage nod_head convention used by VAP_Nodding_para's own model_nod_para.VapGPT (nn.Linear(dim, 1)), and the checkpoints produced by VAP_Nodding_old/train.train_VAP_MT (mt / gt_head).
Source code in src/maai/models/vap_nod_timing.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
forward(x1, x2, cache=None, return_all_frames=False)
Same calling convention as VapGPT_nod.forward (production/streaming interface): pre-encoded x1/x2, optional past-kv cache dict, returns (frame(s), new_cache).
Source code in src/maai/models/vap_nod_timing.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
forward_batch(x1, x2)
Non-streaming, full-context forward (no cache), used for offline batch inference and for validating streaming-vs-batch numerical equivalence. Equivalent to calling forward() with cache=None and return_all_frames=True, but without threading a cache dict through (single shot over the whole sequence).
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
|
Source code in src/maai/models/vap_nod_timing.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |