There is an easy way to summarize your video quickly and effortlessly. OneAI will automatically analyze your video, convert it to text and generate a high-quality summary. That summary can become your YouTube video description, for example. You'll love summarizing once you learn how easy it is!
{{cta}}
For this task let’s take a CNN news report. Here we can download it as audio. Now let’s jump to OneAI studio. Our studio operates with Language Skills, these are represented by a bunch of rectangles. Each Skill can be dragged and dropped onto Skills pipeline box, above the library.
Now upload your audio file. You’ll notice that the “Audio Transcribe” skill was automatically picked for you. We recommend using the following skills in order to get best results:
1. “Proofread” - fix grammar errors and remove filler words from the recognized text
2. “Summarize” - summarize improved text
It’s important to follow the sequence because each of the following skills work with the results of the previous step. That’s why “Summarize” works best after “Proofread”.
Now upload your audio file. You’ll notice that the “Audio Transcribe” skill was automatically picked for you. We recommend using the following skills in order to get best results:
1. “Proofread” - fix grammar errors and remove filler words from the recognized text
2. “Summarize” - summarize improved text
It’s important to follow the sequence because each of the following skills work with the results of the previous step. That’s why “Summarize” works best after “Proofread”.
Feel free to try any other skills. For example, we can drag “Names” after “Summarize” to extract all entities and types.
Our pipeline is ready, time to click run to see the results. Voila!
Try it in the code editor:
Step1: Pick one of the generated code you need to your code editor (click here to generate your own API key):
Step 2: Run “pip install oneai” for Python SDK or “npm install oneai” for Node.js SDK to get the library. Make sure to import all the required packages:
```import oneai
import base64
oneai.api_key = "[YOUR ONEAI API KEY]"
```
In our example, we used Python SDK code. Here is what we got when we run all the skills together: transcription, proofreading, summary, and names:
```with open("AudioFile.mp3", "rb") as f:
pipeline = oneai.Pipeline(
steps = [
oneai.skills.Transcribe(),
oneai.skills.Proofread(),
oneai.skills.Summarize(),
oneai.skills.Names(),
]
)
transcription = pipeline.run(f)
```
Transcription
`transcription.transcription.text`
```
[00:00:03.110] speaker 1:This morning work is underway to rebuild in Florida after hurricane Ian decimated entire neighborhoods, thousands are still without power, but one community hit directly by the storm came out with barely a scratch.[00:00:14.990]
speaker 1:Seen as Bill weir has the story.[00:00:19.130]
speaker 2:When hurricane Ian brought Gus over a 150 miles an hour, much of the power grid in its path did not stand a chance.[00:00:28.070] speaker 2:Look at that.[00:00:29.330]
speaker 2:And thanks to two feet of rain, even communities miles from the storm surge could not escape life altering floods.[00:00:37.250]
speaker 2:But even as white caps, ripped across the Lake in Anthony Grande's backyard, he was chilled out in front of the TV.[00:00:44.930]
speaker 2:You know, that's one of the things I said to my wife when we were sitting there watching TV.[00:00:49.250]
speaker 2:
I'm like, I don't have any fear right now.[00:00:51.770]
speaker 2: Anthony and the 2000 families around him never lost power and did not flood.[00:00:57.830]
speaker 2:Because they live in Babcock ranch, a community about 15 miles from Fort Myers, which is 100% solar powered.
......
```
Proofread:
`transcription.transcription.proofread.text`
```
[:03.110]] speaker 1:This morning work is underway to rebuild in Florida after hurricane Ian decimated entire neighborhoods, thousands are still without power, but one community hit directly by the storm came out with barely a scratch.[:14.990]]
speaker 1:Seen as Bill weir has the story.[:19.130]]
speaker 2:When hurricane Ian brought Gus over a 150 miles an hour, much of the power grid in its path did not stand a chance.[:28.070]]
speaker 2:Look at that.[:29.330]]
speaker 2:And thanks to two feet of rain, even communities miles from the storm surge could not escape life altering floods.[:37.250]]
speaker 2:But even as white caps, ripped across the Lake in Anthony Grande's backyard, he was chilled out in front of the TV.[:44.930]]
speaker 2: That's one of the things I said to my wife when we were sitting there watching TV.[:49.250]]
speaker 2:I don't have any fear right now.[:51.770]]
speaker 2:Anthony and the 2000 families around him never lost power and did not flood.[:57.830]]
speaker 2:Because they live in Babcock ranch, a community about 15 miles from Fort Myers, which is 100% solar powered.
....
```
You can also find the replacements the proofread made and their timestamp:
`transcription.transcription.data[0].replacements`
```
[oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=0, end=6, section=6, text="That's")], span_text="That's", timestamp=datetime.timedelta(seconds=44, microseconds=930000), value="You know, that's"),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=0, end=0, section=7, text='')], timestamp=datetime.timedelta(seconds=49, microseconds=250000), value="I'm like,"),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=12, end=12, section=11, text='')], timestamp=datetime.timedelta(seconds=71, microseconds=810000), value='like,'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=0, end=3, section=12, text='No,')], span_text='No,', timestamp=datetime.timedelta(seconds=72, microseconds=410000), timestamp_end=datetime.timedelta(seconds=72, microseconds=470000), value="I'm like, no,"),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=9, end=16, section=20, text='Hanwell')], span_text='Hanwell', timestamp=datetime.timedelta(seconds=83, microseconds=270000), value='langwell'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=77, end=84, section=30, text='strain,')], span_text='strain,', value='strain'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=32, end=43, section=31, text='Syd kit son')], span_text='Syd kit son', timestamp=datetime.timedelta(seconds=139, microseconds=790000), value='syd kitson'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=10, end=21, section=33, text='field house')], span_text='field house', timestamp=datetime.timedelta(seconds=154, microseconds=970000), value='fieldhouse'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=26, end=26, section=49, text='')], timestamp=datetime.timedelta(seconds=212, microseconds=690000), value='oh,'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=0, end=3, section=53, text='No.')], span_text='No.', timestamp=datetime.timedelta(seconds=225, microseconds=650000), timestamp_end=datetime.timedelta(seconds=225, microseconds=890000), value='No, no.'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=9, end=9, section=59, text='')], timestamp=datetime.timedelta(seconds=239, microseconds=210000), value='wear'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=44, end=47, section=60, text='in,')], span_text='in,', timestamp=datetime.timedelta(seconds=246, microseconds=230000), value='in'),
oneai.Label(type='replacement', skill='enhance', output_spans=[Span(start=4, end=12, section=63, text='kits on,')], span_text='kits on,', timestamp=datetime.timedelta(seconds=254, microseconds=330000), value='kitson,')]```
Summary:
`transcription.transcription.data[0].summary.text`
```
"This morning work is underway to rebuild in Florida after hurricane Ian.
Anthony Grande and 2000 other families never lost power.
Jennifer Hanwell was nervous during the storm, because she has a PhD incivil engineering.
The community is 100% solar powered.
Sid didn't have to give them the land, because the price of solar panels had fallen."```
Names:
`[[x.name,x.value] for x in transcription.data[0].data[0].data[1].names]`
```[['GEO', 'Florida'],
['EVENT', 'hurricane Ian'],
['PERSON', 'Anthony Grande'],
['PERSON', 'Jennifer Hanwell'],
['PERSON', 'Sid']]```
Well, your video summary is ready along with hashtags which you can get from “Names” skills. And there are so many skills you could use for your channel or a podcast! Create a new headline, split the content by topics, and many more. Just check it out in our Language studio and share your ideas with the community.