Skip to content

reuse two speech DMA buffers and remove staging copies, fix speech PCM after overlap trimming - #37

Open
v-singh1 wants to merge 2 commits into
TexasInstruments:mainfrom
v-singh1:main
Open

v-singh1 wants to merge 2 commits into
TexasInstruments:mainfrom
v-singh1:main

Conversation

@v-singh1

Copy link
Copy Markdown
Collaborator
  1. Publish paired input/output blocks only after reconstructing each chunk. Exclude overlapping context and final padding so concatenated output payloads match the PCM saved to the output WAV.
  2. Reuse two DMA buffers across synchronous speech processing stages instead of six per-stage allocations. Preserve distinct DSP input/output storage and copy each ISTFT PCM batch before reusing its output buffer.

Speech enhancement sent input PCM before copying audio into the DMA
buffer and streamed raw ISTFT output before overlap trimming. This
produced zero input payloads and duplicated context in live output
visualization.

Publish paired input/output blocks only after reconstructing each
chunk. Exclude overlapping context and final padding so concatenated
output payloads match the PCM saved to the output WAV.

- Bound visualization payloads to 1024 samples per message.
- Handle odd overlap counts without duplicating boundary samples.
- Preserve the final batch when frame counts divide evenly.
- Validate overlap bounds and matching STFT/ISTFT time geometry.
- Preserve the existing -1 setting for disabled overlap.

Signed-off-by: Vishnu Singh <v-singh1@ti.com>
Reuse two DMA buffers across synchronous speech processing stages instead of
six per-stage allocations. Preserve distinct DSP input/output storage and
copy each ISTFT PCM batch before reusing its output buffer.

Add a caller-owned inference buffer overload and use the DMA mapping directly
for speech input and output, removing both spectral staging vectors. Preserve
the existing vector API and daemon wire protocol. Validate output size before
writing the destination and retain CPU-access synchronization across inference.

TVM tensor and daemon socket copies remain; this is not end-to-end zero-copy.

Signed-off-by: Vishnu Singh <v-singh1@ti.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant