FFFF GitHub - tuankietdang52/YoutubeAnalysisService: Simple backend application for analysis Audio of Youtube Video · GitHub
[go: up one dir, main page]

Skip to content

tuankietdang52/YoutubeAnalysisService

Repository files navigation

Youtube Analysis Service

A simple project for analyze audio of Youtube video and more

shieldsshieldsshieldsshields

image

Features

  • Screenshot Youtube Video Tab without open browser and saving to Cloudinary
  • Download Audio of the video
  • Transcript it to text and check it though AI Detector using ZeroGPT
  • Saving to MongoDB database

Prerequisites

  • Node JS v24.8.0 (latest)
  • MongoDB Server v8.2.0 (latest)
  • Chrome Browser
  • FFMPEG
  • Elevenlabs Api Key
  • ZeroGPT Api Key
  • Cloudinary Api Key and Secret Key

Installation

  • First, we install all the package needed by using

npm install

  • Then, create .env file in root folder with these variable

    HOST=YOUR_HOST
    PORT=YOUR_PORT
    DATABASE_URI=YOUR_DATABASE_URI
    DATABASE_PRODUCTION_URI=YOUR_DATABASE_PRODUCTION_URI (ex: mongodb://db:27017/YoutubeAnalysisService)
    DATABASE_USERNAME=YOUR_DATABASE_USERNAME
    DATABASE_PASSWORD=YOUR_DATABASE_PASSWORD
    ELEVENLABS_API_KEY=YOUR_ELVENLABS_API_KEY
    ZEROGPT_API_KEY=YOUR_ZEROGPT_API_KEY
    CLOUDINARY_NAME=YOUR_CLOUDINARY_STORAGE_NAME
    CLOUDINARY_API_KEY=YOUR_CLOUDINARY_API_KEY
    CLOUDINARY_API_SECRET=YOUR_CLOUDINARY_API_SECRET
    FFMPEG_PATH=YOUR_FFMPEG_PATH
    SCREENSHOT_PATH=YOUR_SAVE_SCREENSHOT_PATH
    AUDIO_PATH=YOUR_SAVE_AUDIO_PATH
    
    
  • Finally, run the project by using (make sure MongoDb server is running)

npm run start or npm run dev

Technology

This project is writing in TypeScript with NodeJS instead of JavaScript cause of the safe typing, clean code with MongoDB for better scale and having no relation, flexibility and more. For screenshot and audio download, with Puppeteer take screenshot with easy headless browser setup and ytdl-core + ffmpeg to download the audio. I'm using ElevenLabs to transcript audio and ZeroGPT instead of GPTZero cause ZeroGPT provide a free plan and easy api approach. Cloudinary is the best API for saving image in the cloud for beginner, offer a free-tier and support image upload, fast delivery via CDN

Docker

Run

docker-compose-up

and then run the container (warning: docker will use the DATABASE_PRODUCTION_URI instead of DATABASE_URI)

API Link

  • Analyze Audio of Youtube Video: /api/analyze
  • Get Transcription with AI Detect Item: /api/transcript/result/:id
0