Skip to content

Commit

Permalink
feat: Refactor transcription options and key phrase extraction
Browse files Browse the repository at this point in the history
- Refactor transcription options in `transcribe_me/audio/transcription.py`
- Update key phrase extraction section in `transcribe_me/audio/transcription.py`
  • Loading branch information
johnnyhuy committed Oct 20, 2024
1 parent 8ff0bce commit 96e8c22
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions transcribe_me/audio/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def transcribe_with_assemblyai(
speaker_labels=True,
summarization=True,
sentiment_analysis=True,
auto_highlights=True,
iab_categories=True,
)
transcriber = aai.Transcriber()
Expand Down Expand Up @@ -116,13 +115,6 @@ def transcribe_with_assemblyai(
file.write(f"Confidence: {result.confidence}\n")
file.write(f"Timestamp: {result.start} - {result.end}\n\n")

# Key Phrases
with open(f"{base_name}_key_phrases.txt", "w", encoding="utf-8") as file:
for phrase in transcript.auto_highlights_result.results:
file.write(f"Highlight: {phrase.text}\n")
file.write(f"Count: {phrase.count}\n")
file.write(f"Rank: {phrase.rank}\n")

# Topic Detection
if transcript.iab_categories:
with open(f"{base_name}_topics.txt", "w", encoding="utf-8") as file:
Expand Down

0 comments on commit 96e8c22

Please sign in to comment.