speech_commands_enriched / data /clip_metadata.py
soeren
ensure correct alignment between metadata and raw data
c624b60
raw
history blame contribute delete
404 Bytes
import pandas as pd
_SPLIT = "train"
df = pd.read_parquet("data/dataset_audio_" + _SPLIT +".parquet.gzip")
clipped_df = df.filter(["label_string", "probability", "probability_vector", "prediction",
"prediction_string", "embedding_reduced"], axis=1)
clipped_df = clipped_df.sort_values(by=["label_string"])
clipped_df.to_parquet("data/dataset_audio_" + _SPLIT +"_clipped.parquet.gzip")