mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Testing transcribe
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Start by making sure the `assemblyai` package is installed.
|
||||
# If not, you can install it by running the following command:
|
||||
# pip install -U assemblyai
|
||||
#
|
||||
# Note: Some macOS users may need to use `pip3` instead of `pip`.
|
||||
|
||||
import assemblyai as aai
|
||||
|
||||
# Replace with your API key
|
||||
aai.settings.api_key = "aa9962f0088a449a9c4ab2361e96cc08"
|
||||
|
||||
# URL of the file to transcribe
|
||||
FILE_URL = "https://github.com/AssemblyAI-Community/audio-examples/raw/main/20230607_me_canadian_wildfires.mp3"
|
||||
|
||||
# You can also transcribe a local file by passing in a file path
|
||||
# FILE_URL = './path/to/file.mp3'
|
||||
|
||||
config = aai.TranscriptionConfig(speaker_labels=True)
|
||||
|
||||
transcriber = aai.Transcriber()
|
||||
transcript = transcriber.transcribe(
|
||||
FILE_URL,
|
||||
config=config
|
||||
)
|
||||
|
||||
for utterance in transcript.utterances:
|
||||
print(f"Speaker {utterance.speaker}: {utterance.text}")
|
||||
@@ -13,4 +13,5 @@ tiktoken
|
||||
PyNaCl
|
||||
flask
|
||||
waitress
|
||||
clickupython
|
||||
clickupython
|
||||
assemblyai
|
||||
Reference in New Issue
Block a user