GithubHelp home page GithubHelp logo

yriyazi / summarizer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 76 KB

his repository demonstrates how to use Hugging Face and OpenAI models to convert spoken language into text and generate concise summaries.

License: Other

Jupyter Notebook 97.19% Python 2.81%
huggingface openai-whisper speech-to-text stt

summarizer's Introduction

summarizer (Speech-to-Text and Summarization with Hugging Face and OpenAI)

Welcome to the Speech-to-Text and Summarization project! This repository demonstrates how to use Hugging Face and OpenAI models to convert spoken language into text and generate concise summaries.

Overview

This project provides a Python script that utilizes Hugging Face's Speech-to-Text model for transcribing audio files. It then leverages OpenAI's Summarization model to create concise summaries from the transcribed text. Additionally, you can integrate FFMpeg for further processing of audio or video files.

Getting Started

  1. Clone the repository to your local machine:
git clone https://github.com/yriyazi/summarizer.git
cd speech-to-text-summarization
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Ensure you have audio files for testing in the audio_files directory.

  2. open main.ipynb

Usage

1. Speech-to-Text Conversion

The script uses Hugging Face's Speech-to-Text pipeline to convert audio files to text. Simply place your audio files in the audio_files directory and run the script.

2. Summarization

After obtaining the transcriptions, the OpenAI Summarization model is used to generate concise summaries. You can adjust the summarization parameters in the code to suit your specific needs.

3. Additional Processing with FFMpeg

Integrate your FFMpeg code to further process the audio or video files as needed.

Example Code

import transformers
from transformers import pipeline

# Speech to Text using Hugging Face
speech_to_text = pipeline('speech-to-text')
audio_input = "your_audio_file.wav"
text_output = speech_to_text(audio_input)[0]['transcription']

# Summarization using OpenAI Model
summarizer = pipeline('summarization')
summary = summarizer(text_output, max_length=100, min_length=30, do_sample=False)[0]['summary_text']

# Further processing or utilization with FFMpeg
# Add your FFMpeg code here

# Now you have a powerful toolset at your fingertips! ๐Ÿ› ๏ธ Let's turn speech into valuable insights and summaries effortlessly. ๐Ÿ’ก

Contributing

We welcome contributions! If you have any ideas or improvements, please open an issue or submit a pull request.

License

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


Feel free to explore, experiment, and innovate with this powerful combination of technologies! If you have any questions or need further assistance, please don't hesitate to reach out. Happy coding! ๐Ÿš€

summarizer's People

Contributors

yriyazi avatar

Watchers

 avatar

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.