asyml / asyml/forte

Copy the audio payload to the new datapack in data augment

Open
#640 0 comments 0 reactions 0 assignees View on GitHub
priority: low
Dominant language
Python
Stars
253
Forks
59
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
In data augmentation module, a new datapack is created after text replacement operations, but it only includes [the updated text](https://github.com/asyml/forte/blob/d3083beca858d7f254090c3e3185f78f2dfed110/forte/processors/data_augment/base_data_augment_processor.py#L450) and does not take the audio payload into account. We want the new datapack to keep the audio info from the previous datapack.

**Describe the solution you'd like**
Copy the audio field to the new datapack in data augmentation module. For example, we can add something like:
```python
new_pack.set_audio(input_pack.audio, input_pack.sample_rate)
```
after [this line](https://github.com/asyml/forte/blob/d3083beca858d7f254090c3e3185f78f2dfed110/forte/processors/data_augment/base_data_augment_processor.py#L776).

Contributor guide

Open the contributing guide

Research direction

Start in forte/processors/data_augment/base_data_augment_processor.py at the referenced new datapack creation and text replacement code, then inspect the datapack audio API. Verify that augmented datapacks retain the input audio and sample rate, and run the relevant data augmentation tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, machine-learning
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.