Skip to content

Commit

Permalink
cookbook: lemur custom chapter summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ods committed Feb 25, 2025
1 parent ca22209 commit e33f783
Showing 1 changed file with 40 additions and 11 deletions.
51 changes: 40 additions & 11 deletions fern/pages/05-guides/cookbooks/lemur/input-text-chapters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
title: 'Creating Chapter Summaries with LeMURs Custom Text Input Parameter'
---





# Creating Chapter Summaries with LeMUR's Custom Text Input Parameter

In this guide, we'll show you how to use AssemblyAI's [LeMUR](https://www.assemblyai.com/blog/lemur/) (Leveraging Large Language Models to Understand Recognized Speech) framework to process an audio file and summarize it into chapters by sending in the timestamped transcript via LeMUR's `input_text` parameter.

> **Note**
> Calling LeMUR using `transcript_ids` is preferred as default. Depending on your use case, you can alternatively use the `input_text` parameter to call LeMUR with custom formatted transcript data including edited transcripts, speaker-labelled transcripts and more.
<Note>
Calling LeMUR using `transcript_ids` is preferred as default. Depending on your use case, you can alternatively use the `input_text` parameter to call LeMUR with custom formatted transcript data including edited transcripts, speaker-labelled transcripts and more.
</Note>

### Get Started

Expand All @@ -23,14 +18,12 @@ First, let's install the AssemblyAI SDK.



```python
```bash
pip install -U assemblyai
```

Import the `assemblyai` package and set your API key.



```python
import assemblyai as aai

Expand Down Expand Up @@ -94,4 +87,40 @@ for result in results:

The output will look similar to the example below.

```
Summary:
This transcript discusses the widespread impact of Canadian wildfires on air quality across the United States. Smoke from these fires is causing hazy conditions and air quality alerts in multiple states, prompting warnings to stay indoors in some areas. Peter DeCarlo, an environmental health expert from Johns Hopkins University, explains that dry conditions and specific weather patterns are channeling the smoke southward, affecting the mid-Atlantic and Northeast regions.
Start timestamp: 240
End timestamp: 60890
Summary:
The transcript discusses the unhealthy air quality in Baltimore due to high levels of particulate matter. These microscopic particles can affect respiratory, cardiovascular, and neurological systems. The concentration of particulate matter has reached dangerous levels, measuring 150 micrograms per cubic meter, which is 10 times higher than the annual average and 4 times higher than the recommended 24-hour average.
Start timestamp: 62270
End timestamp: 113214
Summary:
The text discusses the health impacts of high levels of air pollution, likely due to smoke from wildfires. It explains that the concentration of particles in the air is much higher than usual, leading to various health problems. The most vulnerable groups are identified as children, the elderly, and those with pre-existing health conditions, particularly respiratory or heart issues. The situation is severe enough that outdoor activities are being canceled in places like New York City, despite it being early summer.
Start timestamp: 113342
End timestamp: 158870
Summary:
The text discusses air quality issues related to smoke from wildfires. It mentions that some areas, like New York, are experiencing higher concentrations of smoke, but this will change as the air moves. The impact will vary across different areas over the next few days. The speaker doesn't expect concentrations to increase significantly even if more fires start. The duration of the smoke's impact on the US depends on weather system changes, while the fires themselves are expected to continue burning for some time.
Start timestamp: 162090
End timestamp: 203856
Summary:
The transcript discusses the impact of weather systems on smoke from wildfires affecting the Mid-Atlantic and Northeast regions. It predicts that changing weather patterns will soon push the smoke away from these areas. The speaker also addresses the connection between climate change and increased wildfires, suggesting that such air quality issues may become more frequent in the future, particularly in the western United States.
Start timestamp: 203968
End timestamp: 258010
Summary:
Peter DeCarlo, an associate professor at Johns Hopkins University, discusses how climate change is likely to increase the frequency of extreme weather events in the eastern United States. He suggests that while such events are currently unusual for the region, they may become more common in the future due to climate change.
Start timestamp: 258130
End timestamp: 280290
```

0 comments on commit e33f783

Please sign in to comment.