/Whisper-API-unity

A client library of OpenAI Whisper transcription and translation API for Unity.

Primary LanguageC#MIT LicenseMIT

Whisper-API-unity

A client library of OpenAI Whisper transcription and translation API for Unity.

See also official document.

Features

  • Transcription
    • Speech audio file to text in speeched language.
  • Translation
    • Speech audio file to text in English.

How to import by Unity Package Manager

Add following dependencies to your /Packages/manifest.json.

{
  "dependencies": {
    "com.mochineko.whisper-api": "https://github.com/mochi-neko/Whisper-API-unity.git?path=/Assets/Mochineko/WhisperAPI#1.0.1",
    "com.mochineko.relent": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0",
    "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
    ...
  }
}

How to use

Please generate your API key on OpenAI.

See sample codes.

You can customize handling of retries to fit needs of your project by Relent, e.g. PolicyFactory.

Changelog

See CHANGELOG.

3rd party notices

See NOTICE.

License

Licensed under the MIT License.