Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
airtanscropt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
airtanscropt
Commits
460eaa23
Commit
460eaa23
authored
Dec 11, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make HF_TOKEN optional for pyannote models
parent
45156b52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
README.md
README.md
+1
-1
transcript.py
transcript.py
+2
-6
No files found.
README.md
View file @
460eaa23
...
...
@@ -27,7 +27,7 @@ This Python application transcribes audio files with speaker diarization and tim
```
bash
pip
install
-r
requirements.txt
```
5.
Set Hugging Face token
:
5.
Optional: Set Hugging Face token
for
pyannote models
(
required
for
first download
)
:
```
bash
export
HF_TOKEN
=
your_huggingface_token
```
...
...
transcript.py
View file @
460eaa23
...
...
@@ -27,12 +27,8 @@ def main():
processor
=
AutoProcessor
.
from_pretrained
(
"Qwen/Qwen-Omni-7B"
)
# Load diarization pipeline
# Note: Requires Hugging Face token set as HF_TOKEN environment variable
hf_token
=
os
.
getenv
(
"HF_TOKEN"
)
if
not
hf_token
:
print
(
"Error: Please set HF_TOKEN environment variable for pyannote authentication."
)
return
diarization_pipeline
=
Pipeline
.
from_pretrained
(
"pyannote/speaker-diarization"
,
use_auth_token
=
hf_token
)
# Optional: Set HF_TOKEN environment variable for pyannote authentication (required for first download)
diarization_pipeline
=
Pipeline
.
from_pretrained
(
"pyannote/speaker-diarization"
,
use_auth_token
=
os
.
getenv
(
"HF_TOKEN"
))
# Load audio
audio
,
sr
=
librosa
.
load
(
audio_file
,
sr
=
16000
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment