Giter VIP home page Giter VIP logo

vlog-translator's Introduction

Vlog Transcription & Japanese Translation Tool

A personal tool for transcribing & translating my vlogs into Japanese.

screenshot

Tutorial video

frame_02

Ingredients

  • Python and pip
    • pysrt - Python parser for SubRip (srt) files
    • yt-dlp - A youtube-dl fork with additional features and fixes
    • openai - The OpenAI Python library provides convenient access to the OpenAI API from applications written in the Python language
  • Next.js
  • Radix UI - Unstyled, accessible components for building high‑quality design systems and web apps in React
  • Stitches - CSS-in-JS Library

How to use

  1. Get your OpenAI API Key here
  2. Set an environment variable $OPENAI_API_KEY
  3. Run the following commands
pip install -r requirements.txt
npm i
npm run dev

Project Structure

PROJECT_ROOT
├── components    # React components
├── pages         # Pages
│   └── api       # API routes
├── public
├── scripts       # Python scripts
├── tmp           # Temporary files
└── utils         # Utility modules

License

MIT License.


Looking for a Markdown note-taking app? Check out my app called Inkdrop:

Inkdrop

vlog-translator's People

Contributors

craftzdog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vlog-translator's Issues

translating process

Translating text...
[Error] Traceback (most recent call last):
[Error] File "D:\aaaa\vlog-translator-main\scripts\translate.py", line 3, in
[Error] [Error] import openai
[Error] [Error] ModuleNotFoundError: No module named 'openai'
[Error]
Done!

I ran "pip install openai", but it doesn't work
can you help me fix it?

run error

I buid a docker image and deploy it on the server, but isn't sucsessfull,

Downloading audio...
Transcribing audio. It takes a while...
[Error] Traceback (most recent call last):
[Error] File "/app/scripts/transcribe.py", line 8, in
[Error] [Error] audio_file = open(audio_file_path, "rb")
[Error] FileNotFoundError: [Errno 2] No such file or directory: '/app/tmp/ZBorDL608PQ.m4a'
[Error]
Translating text...

Done!

on local env, it still run error:
D:\vlog-translator>npm run dev

dev
next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from D:\vlog-translator.env
event - compiled client and server successfully in 446 ms (163 modules)
wait - compiling / (client and server)...
event - compiled client and server successfully in 187 ms (204 modules)
wait - compiling /api/audio (client and server)...
event - compiled successfully in 37 ms (58 modules)
video ID: Aa83vRghue4
error - Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:413:11)
at spawn (node:child_process:757:9)
at GET (webpack-internal:///(api)/./pages/api/audio.ts:22:69)
at Object.apiResolver (D:\vlog-translator\node_modules\next\dist\server\api-utils\node.js:372:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DevServer.runApi (D:\vlog-translator\node_modules\next\dist\server\next-server.js:514:9)
at async Object.fn (D:\vlog-translator\node_modules\next\dist\server\next-server.js:828:35)
at async Router.execute (D:\vlog-translator\node_modules\next\dist\server\router.js:243:32)
at async DevServer.runImpl (D:\vlog-translator\node_modules\next\dist\server\base-server.js:432:29)
at async DevServer.run (D:\vlog-translator\node_modules\next\dist\server\dev\next-dev-server.js:831:20)
at async DevServer.handleRequestImpl (D:\vlog-translator\node_modules\next\dist\server\base-server.js:375:20)
at async D:\vlog-translator\node_modules\next\dist\server\base-server.js:157:99 {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn',
page: '/api/audio'
}
wait - compiling /_error (client and server)...
event - compiled client and server successfully in 76 ms (217 modules)
wait - compiling /api/transcript (client and server)...
event - compiled successfully in 31 ms (59 modules)
video ID: Aa83vRghue4
Finished command. Exit code: 9009

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.