post-flow

command module
v0.0.0-...-d5fecd2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 2 Imported by: 0

README

YouTube Transcription and Summarization Service

This project provides a service that searches for YouTube videos based on a query, downloads the audio, transcribes the audio using a third-party API, and then summarizes the transcriptions using ChatGPT API. It's built using Go and integrates various external services for transcription and summarization.

Features

  • YouTube Video Search: Search for videos on YouTube using a specific query.
  • Audio Extraction: Download and extract audio from the YouTube videos.
  • Transcription: Send the audio to a transcription service and receive text transcriptions.
  • Summarization: Summarize the transcriptions using ChatGPT API.

Setup and Installation

  1. Clone the Repository:

    git clone https://github.com/GabrielDillenburg/post-flow/tree/main
    
  2. Set Environment Variables:

    • YOUTUBE_API_KEY: Your API key for the YouTube Data API.
    • TRANSCRIPTION_API_URL: The URL for the transcription service.
    • TRANSCRIPTION_API_TOKEN: The Bearer token for the transcription service.
    • CHAT_GPT_API_URL: The URL for the ChatGPT API.
  3. Install Dependencies (if any):

    go get ./...
    
  4. Run the Service:

    go run main.go 
    

    or

     podman-compose up
    

Usage

Send a POST request to /transcribe endpoint with a JSON body containing the search query. For example:

{
  "query": "your search term"
}

The service will search YouTube videos, download and transcribe the audio, and return a summarized response.

Project Structure

  • server.go: Initializes the HTTP server and defines endpoints.
  • youtube-transcriptor.go: Handles the logic for fetching YouTube videos.
  • downloader.go: Manages the downloading and extraction of audio from YouTube videos.
  • processor.go: Orchestrates the processing workflow, including transcription and summarization.
  • summarizator.go: Handles the communication with the ChatGPT API for summarization.
  • transcriptor.go: Manages the transcription requests to the third-party API.

Contributing

Contributions to the project are welcome! Please create a pull request with your proposed changes.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL