Skip to main content

an openai based game audio translator

Project description

openai-game-translator

ChatGPT API based video game audio translator application and web service

License GitHub issues build codecov PyPI

Overview

A game translation app that uses the ChatGPT API to recognize in-game speech (and even game visuals) and provide smooth text translations on platforms like Switch and PS5, thanks to the powerful language abilities of GPT.

Installation

pip install openai-game-translator

Quick Start

In terminal, run

translate --xunfei_appid <appid> --xunfei_apikey  <apikey> --xunfei_apisecret <apisecret> --openai_key <key> -t <model> -o <language> --pre_recorded <use_prerecored:0|1> --file <audio_path>
  • <model>: transcription model, choose from aws_pre, aws_live and xunfei.
  • <language>: translation target language, for example "English"
  • <use_prerecored>: whether to use prerecorded audio, 0 no, 1 yes
  • <audio_path>: prerecorded or transcription related audio file path

In script, use

import openai
from game_translator import  gameTranslator

openai.api_key = "<openai_key>"
translator = gameTranslator("aws_live")
translator.openai_translation()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openai-game-translator-1.1.0.tar.gz (195.2 kB view details)

Uploaded Source

Built Distribution

openai_game_translator-1.1.0-py3-none-any.whl (193.9 kB view details)

Uploaded Python 3

File details

Details for the file openai-game-translator-1.1.0.tar.gz.

File metadata

File hashes

Hashes for openai-game-translator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f4ef601f669cb560bbb8f55f094865bf39c3f5c72c9aec4fd4ff9b7732416e99
MD5 98fc2f4b16ba70aa8b7b5c2eda742771
BLAKE2b-256 2c75b9c5f89db596b5772f60b3553e09641b47d2826b91c2708db6d1d6d691b9

See more details on using hashes here.

File details

Details for the file openai_game_translator-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_game_translator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49292d863b0948a45cf3971e31155cbfaf902cb99daf21a48cbb603e9b263f82
MD5 68a229ce41f82d7cf38aba817889b477
BLAKE2b-256 886057e794f1022ec3a8dde56f64bc70c857a2c1f581be928ccf6bd680689273

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page