Coder Social home page Coder Social logo

assemblyai-cli's Introduction

AssemblyAI CLI

Release Build License

The AssemblyAI CLI helps you quickly test our latest AI models right from your terminal, with minimal installation required.

Thumbnail

Installation

The CLI is simple to install, supports a wide range of operating systems like macOS, Windows, and Linux, and makes it more seamless to build with AssemblyAI.

Homebrew

If you're on macOS, you can install it using Homebrew:

brew tap assemblyai/assemblyai
brew install assemblyai

macOS or Linux

If you don't have Homebrew installed, or are running Linux:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)"

Windows

The CLI is available on Windows either via Scoop or by script.

Via Scoop:

scoop bucket add assemblyai https://github.com/assemblyai/scoop-assemblyai.git
scoop install assemblyai

Or via PowerShell as an administrator:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.ps1 | iex
New-Alias -Name assemblyai -Value $Env:Programfiles/AssemblyAI/assemblyai.exe

Getting started

Get started by configuring the CLI with your AssemblyAI token. If you don't yet have an account, create one here.

assemblyai config [token]

This command will validate your account, and store your token safely in ~/.config/assemblyai/config.toml later to be used when transcribing files.

You can now transcribe local files and remote URLs.

assemblyai transcribe ./file.mp3 --auto_highlights --entity_detection

Usage

Installing the CLI provides access to the assemblyai command:

assemblyai [command] [--flags]

Commands

Transcribe

With the CLI, you can transcribe local files and remote URLs.

assemblyai transcribe [local file | remote url] [--flags]
Flags

-j, --json
default: false
example: -j or --json
If true, the CLI will output the JSON.

-p, --poll
default: true
example: -p or --poll
The CLI will poll the transcription every 3 seconds until it's complete.

-s, --auto_chapters
default: false
example: -s or --auto_chapters
A "summary over time" for the audio file transcribed.

-a, --auto_highlights
default: false
example: -a or --auto_highlights
Automatically detect important phrases and words in the text.

-c, --content_moderation
default: false
example: -c or --content_moderation
Detect if sensitive content is spoken in the file.

-d, --dual_channel
default: false
example: -d or --dual_channel
Enable dual channel

-D, --disfluencies
default: false
example: -D or --disfluencies
Include Filler Words in your transcript

-e, --entity_detection
default: false
example: -e or --entity_detection
Identify a wide range of entities that are spoken in the audio file.

-f, --format_text
default: true
example: -f=false or --format_text=false
Enable text formatting

-u, --punctuate
default: true
example: -u=false or --punctuate=false
Enable automatic punctuation

-r, --redact_pii
default: false
example: -r or --redact_pii
Remove personally identifiable information from the transcription.

-i, --redact_pii_policies
default: drug,number_sequence,person_name
example: -i medical_process,nationality or --redact_pii_policies medical_process,nationality
The list of PII policies to redact (source), comma-separated. Required if the redact_pii flag is true.

-x, --sentiment_analysis
default: false
example: -x or --sentiment_analysis
Detect the sentiment of each sentence of speech spoken in the file.

-l, --speaker_labels
default: true
example: -l=false or --speaker_labels=false
Automatically detect the number of speakers in the file.

-t, --topic_detection
default: false
example: -t or --topic_detection
Label the topics that are spoken in the file.

-w, --webhook_url
example: --webhook_url "https://example.com/"
Receive a webhook once your transcript is complete.

-b, --webhook_auth_header_name
example: --webhook_auth_header_name "Authorization"
Containing the header's name which will be inserted into the webhook request.

-o, --webhook_auth_header_value
example: --webhook_auth_header_value "foo:bar"
Receive a webhook once your transcript is complete.

-n, --language_detection
default: false
example: -n or --language_detection
Automatic identify the dominant language that’s spoken in an audio file. Here you can view the ALD list for supported languages

-g, --language_code
example: -g es or --language_code es
Manually specify the language of the speech in your audio file. Click here to view all the supported languages

-m, --summarization
default: false
example: -m or --summarization
Generate a single abstractive summary of the entire audio.

-q, --summary_model default: bullets
example: -q conversational or --summary_model conversational
Type of summary generated. Click here to view all the supported types

-y, --summary_type default: bullets
example: -y paragraph or --summary_type paragraph
Model of summary generated. Click here to view all the supported types

-k, --word_boost example: -k "sally mcmanus,the IQEZ iPhone app" or --word_boost "sally mcmanus,the IQEZ iPhone app"
Any term included will have its likelihood of being transcribed boosted.

-z, --boost_param example: -z high or --word_boost high
Control how much weight should be applied to your boosted keywords/phrases. This value can be either low, default, or high. --custom_spelling example: --custom_spelling "[{\"from\": [\"ariana\"], \"to\": \"Arianna\"}]" or --custom_spelling ./custom_spelling.json Specify how words are spelled or formatted in the transcript text.

--srt
default: false
example: --srt
Create an SRT file named [id].srt in the current directory.

Get

If you're not polling the transcription, you can fetch it later:

assemblyai get [id]
Flags

-j, --json
default: false
example: --json or --json=true
If true, the CLI will output the JSON.

-p, --poll
default: true
example: --poll=false
The CLI will poll the transcription every 3 seconds until it's complete.

--srt
default: false
example: --srt
Create an SRT file named [id].srt in the current directory.

Exporting Output to a File

You can export the output of AssemblyAI CLI commands to a file by using shell redirection. To export the output to a text file, use the > operator followed by the name of the file you want to create.

assemblyai get [id] > transcript.txt

To save the raw JSON response from the API, you can do this instead:

assemblyai get [id] -j > transcript.json

Note that if the file you are exporting to already exists, its contents will be overwritten. If you want to append the output to an existing file, use the >> operator instead of >.

Contributing

We're more than happy to welcome new contributors. If there's something you'd like to fix or improve, start by creating an issue. Please make sure to follow our code of conduct.

Telemetry

The AssemblyAI CLI includes a telemetry feature that collects usage data and is enabled by default.

To opt out of telemetry, set the telemetry variable in the config.toml file to false.

Upgrade

Our team regularly releases updates to ensure world-class service, so make sure to update your CLI when a new release is available. You can do so by running the same commands as shown on the Installation section, or, if you've installed using brew, run:

brew upgrade assemblyai

Feedback

Please don't hesitate to let us know what you think!

Uninstall

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/uninstall.sh)"

We'd love to understand why you're uninstalling the CLI, and what we can do to improve it. Feel free to reach out.

License

Copyright (c) AssemblyAI. All rights reserved.

Licensed under the Apache License 2.0 license.

assemblyai-cli's People

Contributors

ajcwebdev avatar albtsantos avatar cx-duan avatar fcastillo90 avatar github-actions[bot] avatar m-ods avatar mlawlz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

assemblyai-cli's Issues

API doesnt work on youtube videos

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

Screenshots
image

Desktop (please complete the following information):

  • OS: [Windows]
  • Using python code

Additional context

Pyaudio Issue

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):

  • OS: [e.g. macOS]
  • CLI Version [e.g. 0.22]

Add support for the subtitle endpoints

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.

install script not working

Describe the bug
install script not working

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/AssemblyAI/assemblyai-cli.git
  2. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)"
  3. Using the OSS distribution...
    Downloading AssemblyAI CLI v1.14.2...
    Installing AssemblyAI to /home/dirk/.assemblyai-cli
    Welcome to the AssemblyAI CLI!
    Please start by running assemblyai config [token]
    /bin/bash: Zeile 71: zsh: Befehl nicht gefunden

Expected behavior
Installation should work

Desktop (please complete the following information):

  • OS: Ubuntu
  • CLI Version v1.14.2

Installation fails on Windows

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.

image

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:

  • OS: Windows 10
  • CLI Version: PowerShell 7

means of payment

Please consider enabling subscribers to use PayPal of Google Pay for payment.

installation script: download failing on Linux x86_64

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. πŸ™‚

Environment

OS: Ubuntu 22.04

Troubleshooting

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

Install fail

Describe the bug
Access to AssemblyAI is denied

To Reproduce
Steps to reproduce the behavior:

  1. Following instruction on installing via powershell

  2. Copy pasted the command to install assemblyai via powershell

  3. See error
    New-Item : Access to the path 'AssemblyAI' is denied.
    At line:34 char:3

  • New-Item -ItemType Directory -Path $INSTALL_DIR
  • + 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

  • Copy-Item $BINARY $TARGET -Force
  •   + 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

  • Start-Process -FilePath $TARGET -ArgumentList "welcome -i -o=windows ...
  •   + 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):

  • OS: WIndows 11
  • CLI Version Latest version according to my written date

Additional context
Add any other context about the problem here.

The JSON files have an unnecessary line at the top

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:

  1. Install jq to parse the JSON
  2. Run assemblyai get {transcript ID} -j > id.json
  3. jq . id.json
  4. parse error: Invalid numeric literal at line 1, column 13

Expected behavior
jq should parse the transcript's json file without issue.

Desktop (please complete the following information):

  • OS: macOS
  • CLI Version v1.10.2

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!

issue when used on openwrt -

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

panic : runtime error when using assemblyai transcribe "youtube url

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
'''

Expose transcript completion and failure times consistently

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:

  • uploaded timestamp
  • transcription job start timestamp
  • transcription job completed timestamp
  • transcription job failed timestamp

Describe alternatives you've considered
I'm just regularly importing the CSV to capture the missing completion times and doing my best to reconcile.

MAC Montery 12.6: Something went wrong. Please try again.

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

Crash in `GetSentenceTimestamps` when doing transcribe/get

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.

Discord webhook URL as webhook_url has no effect

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:

  1. Create a Discord webhook
  2. Test the webhook using Postman, confirming that it works as expected
  3. Use the same URL as the value for --webhook_url
  4. Nothing happens in Discord

Expected behavior
I should see something in Discord

Desktop (please complete the following information):

  • OS: macOS
  • CLI Version 1.17.3

Add ability to store srt file in desired location

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.

List transcripts

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.

Authentication failed when using CLI on Mac

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.
image

Desktop (please complete the following information):

  • OS: [e.g. macOS]
  • CLI Version v1.17.1

Additional context
Add any other context about the problem here.

panic: run time error

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.

Unable to install CLI on raspberry pi

Describe the bug
When attempting to install the CLI on a raspberry pi, it fails without any errors

To Reproduce

  1. SSH into the raspberry pi
  2. Execute /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.

Support writing transcribed text to a file.

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.

panic: runtime error: index out of range [7192] with length 7192

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`

Add word boost and custom vocabulary

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.