PhoWhisper-ct2

This repository contains 5 versions of PhoWhisper model converted to use CTranslate2 for faster inference. This allows for significant performance improvements, especially on CPU.

PhoWhisper homepage

PhoWhisper paper

Usage

  1. Installation: Ensure you have the necessary libraries installed:

    pip install transformers ctranslate2 faster-whisper
    
  2. Download the ct2 model to local (optional): Download the ct2 model you want to use.

  3. Transcription:

    import os
    from faster_whisper import WhisperModel
    
    model_size = "quocphu/PhoWhisper-ct2-FasterWhisper/PhoWhisper-medium-ct2-fasterWhisper" # or your model path if you have downloaded
    # Run on GPU with FP16
    #model = WhisperModel(model_size, device="cuda", compute_type="float16")
    
    # or run on GPU with INT8
    # model = WhisperModel(model_size, device="cuda", compute_type="int8_float16")
    # or run on CPU with INT8
    model = WhisperModel(model_size, device="cpu", compute_type="int8")
    
    segments, info = model.transcribe("audio.wav", beam_size=5) # Replace audio.wav with your audio file
    
    print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
    
    for segment in segments:
        print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
    

Model Details

  • Based on the PhoWhisper model.
  • Converted using ct2-transformers-converter.
  • Optimized for faster inference with CTranslate2.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

More about Faster-Whisper

Faster-Whisper homepage

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for quocphu/PhoWhisper-ct2-FasterWhisper

Finetuned
(3)
this model