--- 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 ```python 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 ```python 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