assemblyai / assemblyai-cli Goto Github PK
View Code? Open in Web Editor NEWCLI for the AssemblyAI API
License: Apache License 2.0
CLI for the AssemblyAI API
License: Apache License 2.0
Please describe your feature request
Add output file flag to write the transcribe text. Currently assemblyai write the text to stdout.
This can be done with bash redirect
assemblyai transcribe audio.mp4 > file.txt
I think it is good to support this out of box
assemblyai transcribe audio.mp4 --output file.txt
The flag name for the output can be -f
,--output-file
or any other.
Checks need to be performed if the flag is given before transcribing. Like checking the file doesn't exist, also the folder exists in case of output some/path/to/file.txt
. Check some/path/to/
exists, but file.txt
doesn't exists in the folder. Check permission to write/create file.txt before transcribing.
Describe the bug
install script not working
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Installation should work
Desktop (please complete the following information):
Describe the bug
I installed CLI using homebrew , then I try to do authentication using command
assemblyai config [mytoken]
but CTL return something run :
Something went wrong . Please try it again .
Expected behavior
I need to fix this ,and authentic successfully
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Please describe your feature request
I want to be able to access the subtitle endpoint for after transcripts are finished processing so that it would be possible to download .srt files or pipe the text output into another API like Mux which is a video API.
Describe alternatives you've considered
I've used this with CURL requests and python, but prefer the assemblyai-cli.
Additional context
The Mux docs show how to add subtitles when creating an asset or you can also add them later. But you need to pass a URL to the .srt file, which means assemblyai-cli should have the option to download the .srt file as well as provide the text output.
Thanks in advance for your consideration.
Description
Installation fails on Windows when executing the second command
iex "$(curl https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.ps1)"
.
Output:
- Unexpected token '"-i"' in expression or statement.
To Reproduce
Run the following commands in PowerShell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iex "$(curl https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.ps1)"
New-Alias -Name assemblyai -Value C:\\'./Program Files\'/AssemblyAI/assemblyai.exe
Desktop:
Please describe your feature request
When I fetch the transcript, say, when I'm polling, the response does not include the time the transcription finished.
However, the completion time is exposed when I export transcript jobs via CSV.
This makes it troublesome to synchronize data on my side. For my monitoring, it's helpful to have logs for when things started, failed, etc.
Ideally, the CSV export data and response should align so I can better reconcile the job data:
Describe alternatives you've considered
I'm just regularly importing the CSV to capture the missing completion times and doing my best to reconcile.
Please forgive me if I am missing some other obvious way of processing the json.
Describe the bug
Using the -j flag on the get command for a transcript adds a line "Transcribing file with id rxzk61qto3-0573-48f4-824e-2a161985ef53" which causes jq (JSON parser) to return an error.
IMO, this line is unnecessary or there should be an option to remove it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
jq should parse the transcript's json file without issue.
Desktop (please complete the following information):
Additional context
If there's another workflow that I'm unaware of to process the output (whether it uses json or not), please let me know!
Describe the bug
When attempting to install the CLI on a raspberry pi, it fails without any errors
To Reproduce
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)"
Expected behavior
Installs the CLI
Experienced behavior
Prints
Using the OSS distribution...
Downloading AssemblyAI CLI v1.17.4...
No errors or other information is printed.
Desktop (please complete the following information):
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
Additional context
n.a.
I want test the flag "--custom_spelling ./custom_spelling.json", but I got an Error:
"Error parsing custom spelling file"
The json file just contains the example from here:
https://www.assemblyai.com/docs/core-transcription#custom-spelling
What am I doing wrong?
When transcribing a video, cli has crashed with a traceback; doing assemblyai get
crashed in exactly the same spot:
$ assemblyai get rptv3lsl5w-8310-4944-a086-d49f5e5a26b5 2
Transcribing file with id rptv3lsl5w-8310-4944-a086-d49f5e5a26b5
Transcript
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/AssemblyAI/assemblyai-cli/utils.GetSentenceTimestamps({0x140006be000?, 0x29c, 0x101222b01?}, {0x14001214000, 0x7507, 0x100f36908?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/utils.go:272 +0x634
github.com/AssemblyAI/assemblyai-cli/utils.textPrintFormatted({0x1400033c000, 0x26686}, {0x14001214000, 0x7507, 0xa005})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:339 +0x114
github.com/AssemblyAI/assemblyai-cli/utils.getFormattedOutput({0x14000332ae0, 0x14000405788, 0x0, 0x0, 0x14000332b10, 0x140004057ac, 0x1400040579a, 0x0, {0x0, 0x0}, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:298 +0xcc
github.com/AssemblyAI/assemblyai-cli/utils.PollTranscription({0x16ef9f72f, 0x26}, {0x0?, 0x0?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:280 +0x2d0
github.com/AssemblyAI/assemblyai-cli/cmd.glob..func2(0x101679460?, {0x140000694b0?, 0x1?, 0x1?})
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/get.go:45 +0x124
github.com/spf13/cobra.(*Command).execute(0x101679460, {0x14000069490, 0x1, 0x1})
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:876 +0x4b8
github.com/spf13/cobra.(*Command).ExecuteC(0x1016796e0)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:990 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:918
github.com/AssemblyAI/assemblyai-cli/cmd.Execute()
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/root.go:42 +0xa8
main.main()
/home/runner/work/assemblyai-cli/assemblyai-cli/main.go:11 +0x1c
You've got transcription ID right in there, so please investigate.
macOS 13.2, AssemblyAI CLI v1.14.2.
Installed latest Xcode CLI and assenblyai
with
brew tap assemblyai/assemblyai
brew install assemblyai
Unfortunately it doesn't work on my mac.
Message :
~ % assemblyai transcribe https://youtu.be/0wvBu014E5o -auto_highlights - entity_detection
Transcribing a youtube video....
Something went wrong. Please try again.
I try several youtube links.
local mp3 file transcripts have works
hi there i installed you software but it creates an unknown user -- > [\e]0;\u@\h: \w\a]\u@\h:\w$ when i finished installing it and the software only works from with in this user. from the normal user it does not work and has this error
root@OpenWrt:~# assemblyai transcribe "/root/recording.wav"
Usage: assemblyai [OPTIONS]
Try 'assemblyai --help' for help.
Error: Got unexpected extra arguments (transcribe /root/recording.wav)
currently logged in from ssh so once I log out of the unknown user there be no way to log back in
as a foot note I had issue with the install script it uses rev and i had no rev on my device so I replaces rev with sed
test -z "$VERSION" && VERSION="$(curl -sfL -o /dev/null -w %{url_effective} "$RELEASES_URL/latest" |
sed $'s/./&\\\n/g' | sed -ne $'x;H;${x;s/\\n//g;p;}' |
cut -f1 -d'/'|
sed $'s/./&\\\n/g' | sed -ne $'x;H;${x;s/\\n//g;p;}')"
it is install on 86_64 type device
Describe the bug
I get an error RuntimeError: Transcription failed: File does not appear to contain audio. File type is text/html (HTML document, UTF-8 Unicode text, with very long lines).
when I send a youtube link
To Reproduce
Steps to reproduce the behavior:
import requests
import json
import time
base_url = "https://api.assemblyai.com/v2"
headers = {
"authorization": Auth
}
data = {
"audio_url": "https://www.youtube.com/watch?v=Abo19IokvKs&ab_channel=JimmyKimmelLive"
}
url = base_url + "/transcript"
response = requests.post(url, json=data, headers=headers)
transcript_id = response.json()['id']
polling_endpoint = f"https://api.assemblyai.com/v2/transcript/{transcript_id}"
while True:
transcription_result = requests.get(polling_endpoint, headers=headers).json()
if transcription_result['status'] == 'completed':
print(transcription_result['text'])
break
elif transcription_result['status'] == 'error':
raise RuntimeError(f"Transcription failed: {transcription_result['error']}")
else:
time.sleep(3)
Expected behavior
Transcription of video audio
Desktop (please complete the following information):
Additional context
I am trying to run the streamlit app and am getting this issue. It seems to be an issue with my microphone my Mac. My microphone is enabled but I am still getting the issue when running the app. Why is this happening?
OSError: [Errno -9999] Unanticipated host error
Traceback:
File "/Users/camabernethy/opt/anaconda3/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/Users/camabernethy/Real-time-transcription-from-microphone/sr_in_streamlit.py", line 22, in
stream = p.open(
File "/Users/camabernethy/opt/anaconda3/lib/python3.9/site-packages/pyaudio/init.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
File "/Users/camabernethy/opt/anaconda3/lib/python3.9/site-packages/pyaudio/init.py", line 441, in init
self._stream = pa.open(**arguments)
Expected behavior
Ability to record.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
In YoutubeDownload, the global variable Filename
is overwritten, making it difficult to import and use these functions in external packages:
assemblyai-cli/utils/youtube.go
Line 100 in a37341c
My use case is that I'm trying to make use of the AssemblyAI API, and I am re-using some of your functions in my own go program.
Describe the bug
Providing a Discord webhook URL as the string value to the the --webhook_url
parameter to the transcribe
command
To Reproduce
Steps to reproduce the behavior:
--webhook_url
Expected behavior
I should see something in Discord
Desktop (please complete the following information):
Please describe your feature request
At the moment you can use --srt
in the CLI to generate an srt file at <id>.srt
. However, I'd like to specify the path the srt file would be stored at.
Describe alternatives you've considered
Currently I'm doing the following
video_path=...
srt_path="${video_path%.*}.srt"
tmp_path=$(assemblyai transcribe <file> --srt | tail -n 1 | awk '{print $NF}')
mv "${tmp_path}" "${srt_path}"
Additional context
n.a.
Hi,
I wanted to install the assemblyai-cli on Linux:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)"
=>
Using the OSS distribution...
Downloading AssemblyAI CLI v1.9.1...
No more output. ๐
OS: Ubuntu 22.04
It looks like the script is trying to download
$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_${VERSION:1}_$(uname -s)_$(uname -m).tar.gz
https://github.com/AssemblyAI/assemblyai-cli/blob/main/install.sh#L25
In my env:
uname -s
=>
Linux
uname -m
=>
x86_64
But there's no version to download with the suffix "linux_x86_64.tar.gz" among the releases
Describe the bug
Access to AssemblyAI is denied
To Reproduce
Steps to reproduce the behavior:
Following instruction on installing via powershell
Copy pasted the command to install assemblyai via powershell
See error
New-Item : Access to the path 'AssemblyAI' is denied.
At line:34 char:3
+ CategoryInfo : PermissionDenied: (C:\Program Files\AssemblyAI:String) [New-Item], UnauthorizedAccessException
+ FullyQualifiedErrorId : CreateDirectoryUnauthorizedAccessError,Microsoft.PowerShell.Commands.NewItemCommand
Copy-Item : Could not find a part of the path 'C:\Program Files\AssemblyAI\assemblyai.exe'.
At line:37 char:1
+ CategoryInfo : NotSpecified: (:) [Copy-Item], DirectoryNotFoundException
+ FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand
Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At line:39 char:1
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Expected behavior
It should install
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Please consider enabling subscribers to use PayPal of Google Pay for payment.
Please describe your feature request
Add ability to list all transcripts. This would make it easier to follow some guides where the transcript ID's are required, such as LeMUR related guides.
Please describe your feature request
Word boost and custom vocabulary are two really important features of AssemblyAI (and other transcription services) but are for some reason not included in assemblyai-cli. Having these features would make scripting it WAY easier in my opinion.
Describe alternatives you've considered
I tried using curl requests, but find it to be too cumbersome compared to the ease of assemblyai-cli.
Additional context
I have tweaked yt-dlp extensively to be able to download videos and embed metadata, so being able to transcribe them via the cli would improve the ability to catalog clips effectively. All the other features are great and I use them, but many niches have lots of custom vocabulary.
I'm recieving this output whenever I run the given command ( assemblyai transcribe "youtube url" ) :-
'''
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x95e8db]
goroutine 1 [running]:
github.com/AssemblyAI/assemblyai-cli/utils.YoutubeDownload({0xc00001e440?, 0xc0003755f0?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/youtube.go:56 +0x2bb
github.com/AssemblyAI/assemblyai-cli/utils.Transcribe({{0xc00001e420, 0x2b}, 0x0, 0x0, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:78 +0x1bf
github.com/AssemblyAI/assemblyai-cli/cmd.glob..func4(0xdf9bc0?, {0xc000301710?, 0x1?, 0x1?})
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/transcribe.go:249 +0xcf0
github.com/spf13/cobra.(*Command).execute(0xdf9bc0, {0xc0003016f0, 0x1, 0x1})
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0xdf9940)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:918
github.com/AssemblyAI/assemblyai-cli/cmd.Execute()
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/root.go:42 +0x85
main.main()
/home/runner/work/assemblyai-cli/assemblyai-cli/main.go:11 +0x17
'''
I don't know, if I can post it here.
It's not a bug, I think.
But I got the following error message. What does it mean? It's only when i try one specific mp3-file.
Other files worked well without any issue.
Can somebody help me?
`panic: runtime error: index out of range [7192] with length 7192
goroutine 1 [running]:
github.com/AssemblyAI/assemblyai-cli/utils.GetSentenceTimestamps({0xc00031c000?, 0x111, 0x1051601?}, {0xc00086c000, 0x1c18, 0xc0001fb4d8?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/utils.go:274 +0x71a
github.com/AssemblyAI/assemblyai-cli/utils.textPrintFormatted({0xc0002d4000, 0xaaa6}, {0xc00086c000, 0x1c18, 0x1f9c})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:381 +0x13c
github.com/AssemblyAI/assemblyai-cli/utils.getFormattedOutput({0xc000088630, 0xc0002d0f78, 0x0, 0x0, 0xc000088660, 0xc0002d0f9c, 0xc0002d0f89, 0x0, {0x0, 0x0}, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:337 +0xd3
github.com/AssemblyAI/assemblyai-cli/utils.PollTranscription({0xc0000c8b70, 0x26}, {0x80?, 0x5?, 0x0?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:319 +0x428
github.com/AssemblyAI/assemblyai-cli/utils.Transcribe({{0xc000026190, 0x46}, 0x0, 0x0, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:154 +0x672
github.com/AssemblyAI/assemblyai-cli/cmd.glob..func4(0x1058aa0?, {0xc00002c6f0?, 0x3?, 0x3?})
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/transcribe.go:261 +0xdd0
github.com/spf13/cobra.(*Command).execute(0x1058aa0, {0xc00002c6c0, 0x3, 0x3})
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:876 +0x67b
github.com/spf13/cobra.(*Command).ExecuteC(0x1058820)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:918
github.com/AssemblyAI/assemblyai-cli/cmd.Execute()
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/root.go:42 +0x85
main.main()
/home/runner/work/assemblyai-cli/assemblyai-cli/main.go:11 +0x17`
Describe the bug
I tried to run the following command:
assemblyai transcribe https://www.youtube.com/watch\?v\=xUqN2kj6Tt0 --auto_highlights --entity_detection
to transcribe a brazilian portuguese video, but got the output:
Transcribing YouTube video...
Downloading video: 5.77 MB / 5.77 MB 100.00% 1s
Uploading file to our servers: 5.77 MB / 5.77 MB 100.00% 20s
Transcribing file with id r2saqo91d8-0cc5-4b7e-9256-1d19edcd7b35
Transcript
Highlights
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10450eed4]
goroutine 1 [running]:
github.com/AssemblyAI/assemblyai-cli/utils.getFormattedOutput({0x140000e3eb0, 0x140000275e0, 0x0, 0x0, 0x140000e3ee0, 0x140000275f7, 0x140000275f0, 0x0, {0x0, 0x0}, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:306 +0x194
github.com/AssemblyAI/assemblyai-cli/utils.PollTranscription({0x140000ce4e0, 0x26}, {0x80?, 0x5?})
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:280 +0x2d0
github.com/AssemblyAI/assemblyai-cli/utils.Transcribe({{0x1400002bd10, 0x46}, 0x0, 0x1, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/home/runner/work/assemblyai-cli/assemblyai-cli/utils/transcribe.go:144 +0x588
github.com/AssemblyAI/assemblyai-cli/cmd.glob..func4(0x104985960?, {0x14000214ba0?, 0x3?, 0x3?})
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/transcribe.go:259 +0xafc
github.com/spf13/cobra.(*Command).execute(0x104985960, {0x14000214b70, 0x3, 0x3})
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:876 +0x4b8
github.com/spf13/cobra.(*Command).ExecuteC(0x1049856e0)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:990 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/work/assemblyai-cli/assemblyai-cli/vendor/github.com/spf13/cobra/command.go:918
github.com/AssemblyAI/assemblyai-cli/cmd.Execute()
/home/runner/work/assemblyai-cli/assemblyai-cli/cmd/root.go:42 +0xa8
main.main()
/home/runner/work/assemblyai-cli/assemblyai-cli/main.go:11 +0x1c
Not sure why it happened, I tried with different brazilian videos, and same thing. Maybe it is something about the language.
When trying with ensligh videos, everything works fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.