Installation

Get started with our library by following these simple steps.

Python

pip install wavify

Quick Start

Get up and running with our library in no time.

Download models from GitHub.

Python

import os
from wavify.stt import SttEngine

engine = SttEngine("path/to/your/model", os.getenv("WAVIFY_API_KEY"))
result = engine.stt_from_file("/path/to/your/file")
print(result)

API Reference

Explore the available methods and options in our library.

Python

stt.SttEngine = class SttEngine(builtins.object)
 |  stt.SttEngine(model_path: str, api_key: str, lib_path=None)
 |  
 |  A class to represent the Speech-to-Text (STT) engine.
 |  
 |  Attributes:
 |      lib (CDLL): The loaded wavify core library.
 |      engine_inner (POINTER(SttEngineInner)): A pointer to the inner STT engine structure.
 |  
 |  Methods defined here:
 |  
 |  __init__(self, model_path: str, api_key: str, lib_path=None)
 |      Initialize the STT engine.
 |      
 |      Args:
 |          model_path (str): The path to the model file.
 |          api_key (str): The API key for authentication.
 |          lib_path (Path, optional): The path to the library. If None, default paths will be used.
 |      
 |      Raises:
 |          NotImplementedError: If the provided library path is not supported.
 |  
 |  destroy(self)
 |      Destroy the STT engine and free resources.
 |  
 |  stt(self, data)
 |      Perform speech-to-text on the given data.
 |      
 |      Args:
 |          data (list): A list of float values representing the audio data.
 |      
 |      Returns:
 |          str: The transcribed text.
 |  
 |  stt_from_file(self, file: pathlib.Path)
 |      Perform speech-to-text on audio data from a mono, 16bit wave file.
 |      
 |      Args:
 |          file (Path): The path to the wave file.
 |      
 |      Returns:
 |          str: The transcribed text.