Instructions to use der02/sinama-translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use der02/sinama-translator with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://der02/sinama-translator") - Notebooks
- Google Colab
- Kaggle
metadata
library_name: keras
tags:
- audio-classification
- cnn
- cebuano
- sinama
- mel-spectrogram
pipeline_tag: audio-classification
Sinama Audio Classifier
A CNN-based audio classification model trained to recognise spoken Cebuano / Sinama words from short audio clips.
Usage
Via Inference API
import requests
API_URL = "https://api-inference.huggingface.co/models/YOUR_USERNAME/sinama-translator"
headers = {"Authorization": "Bearer hf_YOUR_TOKEN"}
with open("audio.wav", "rb") as f:
response = requests.post(API_URL, headers=headers, data=f.read())
print(response.json())
# [{"label": "ako", "score": 0.95}, ...]
Local inference
import tensorflow as tf, json, librosa, numpy as np
model = tf.keras.models.load_model("best_model.keras")
with open("label_map.json") as f:
label_map = {int(k): v for k, v in json.load(f).items()}
# preprocess your audio the same way as training …
pred = model.predict(features)
print(label_map[pred.argmax()])
Training details
- Architecture: 3-block CNN (Conv2D → BN → ReLU → MaxPool → Dropout)
- Features: 128-bin Mel Spectrogram, 4 s clips, 22 050 Hz
- Optimiser: Adam
- Loss: Categorical cross-entropy