Skip to main content

Utility toolkit for data exploration, audio mel-spectrogram generation, and Spanish phonetic processing.

Project description

Logo synapse.ai

synapseTools

License: Apache 2.0

Data exploration, audio features, and Spanish phonetics in one toolbox


Overview

synapseTools is a utility library maintained by SYNAPSE AI SAS that currently includes:

  • Exploratory data analysis (EDA): functions for null detection, outlier analysis, correlation heatmaps, and PCA visualization.
  • Audio processing: mel-spectrogram generation and visualization for audio workflows.
  • Spanish phonetics: phoneme and accent transformations tailored for Rioplatense Spanish.

This is an evolving project designed as the foundation for a comprehensive framework to work with data, AI, and autonomous agents. We are continuously expanding the toolkit with new features and capabilities.

Core principles:

  • Practical – simple, focused functions with sensible defaults.
  • Composable – integrate easily into your pipelines and notebooks.

Installation

pip install synapseTools

The package targets Python 3.8+.

If you want to install only specific feature sets you can use extras:

# Full installation (equivalent to base install)
pip install "synapseTools[all]"

# Only EDA utilities
pip install "synapseTools[eda]"

# Only audio / mel-spectrogram utilities
pip install "synapseTools[mel]"

# Only phoneme / accent tools
pip install "synapseTools[phonemes]"

For reproducible environments, we recommend using python -m venv or a tool like uv, poetry, or pipenv.


Modules

synapse_tools.eda

Utilities for quick exploratory data analysis on pandas.DataFrame objects.

  • nulls(data, column) – prints count and percentage of nulls in a column.
  • outliers(data, column, ...) – histogram + boxplot + descriptive statistics and IQR-based outlier detection, with optional dictionary output.
  • heatmap_correlation(data, columns, ...) – Spearman/Pearson correlation heatmap with save/show options.
  • pca_view(data, dimensions, target=None, ...) – runs PCA (2D or 3D) with optional scaling and target coloring.

These functions are handy when you want fast, visual feedback about a dataset without writing a lot of boilerplate plotting code.

synapse_tools.mel_spectrograms

Helpers for turning audio files into mel spectrograms and plotting them.

  • load_audio_to_mel(file_path, sr=22050, ...) – loads an audio file, normalizes it, and returns a mel spectrogram as a NumPy array.
  • graph_mel_spectrogram(spectrogram, output_dir='', name='Spectrogram', ...) – visualizes (and optionally saves) a mel spectrogram image.

This is especially useful in speech and TTS workflows where you need a repeatable way to extract and inspect mel features.

synapse_tools.phonemes

Rule-based utilities focused on Rioplatense Spanish (Argentina / Uruguay).

  • phoneme(text, punctuation=False) – converts Spanish text into a simplified phoneme sequence using deterministic rules.
  • accent(text, punctuation=False) – applies prosodic accentuation based on Spanish stress rules.
  • dictionaries(text, order_by_frequency=True, pad=True) – builds phoneme-to-index and frequency dictionaries for modeling.
  • phoneme_graphs(tokens, quantity, ...) – bar chart of phoneme frequencies.
  • embeddings(input_dim, output_dim, std, ...) – frequency-aware initialization matrix for embedding layers.

These tools are designed to play nicely with downstream NLP / TTS models, where you often need custom tokenization and embeddings.


Basic usage

import pandas as pd
from synapse_tools import nulls, outliers, heatmap_correlation, load_audio_to_mel, graph_mel_spectrogram, phoneme

# EDA
df = pd.read_csv("data.csv")
nulls(df, "age")
outliers(df, "salary")

# Audio
mel = load_audio_to_mel("audio.wav")
graph_mel_spectrogram(mel, name="example")

# Phonetics (Rioplatense Spanish)
phoneme_text = phoneme("Esta es una oración de prueba.")
print(phoneme_text)

Contributing

If you want to contribute, see CONTRIBUTING.md.


License

This project is licensed under the Apache 2.0 license. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synapsetools-0.1.32.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synapsetools-0.1.32-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file synapsetools-0.1.32.tar.gz.

File metadata

  • Download URL: synapsetools-0.1.32.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synapsetools-0.1.32.tar.gz
Algorithm Hash digest
SHA256 8ee0f213dc11c1654785ae03cb764a985039ffd3528c184bfaeebfe13701f6fa
MD5 f9aaf6da3ebc2d7b5304bd99f610721a
BLAKE2b-256 02d47c27d1f1e49e19088348fa31f7c789bd595a04d2502a5baf8dc9a002c1d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapsetools-0.1.32.tar.gz:

Publisher: publish-pypi.yml on synapse-ai-hub/synapseTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synapsetools-0.1.32-py3-none-any.whl.

File metadata

  • Download URL: synapsetools-0.1.32-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synapsetools-0.1.32-py3-none-any.whl
Algorithm Hash digest
SHA256 80a8301907a42d1d21b903582f21467cadb488ab10b216014cd5da9ecd7ebdfb
MD5 1381c7d394a72772b4d9bb9b85172d2d
BLAKE2b-256 d22d776527b7e7218f96c0c20879b878c1616504f9244d47ee344ada47d5c5c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapsetools-0.1.32-py3-none-any.whl:

Publisher: publish-pypi.yml on synapse-ai-hub/synapseTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page