fmt
This commit is contained in:
1 file changed
+22
-5
+22
-5
@@ -24,8 +24,14 @@ usage() {
|
|||||||
}
|
}
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--srt) srt=true; shift ;;
|
--srt)
|
||||||
--no-diarization) diarization=false; shift ;;
|
srt=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--no-diarization)
|
||||||
|
diarization=false
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--speakers)
|
--speakers)
|
||||||
if [[ ! ${2:-} =~ ^([1-9]|[1-5][0-9]|6[0-4])$ ]]; then
|
if [[ ! ${2:-} =~ ^([1-9]|[1-5][0-9]|6[0-4])$ ]]; then
|
||||||
echo '--speakers must be an integer between 1 and 64' >&2
|
echo '--speakers must be an integer between 1 and 64' >&2
|
||||||
@@ -66,9 +72,18 @@ while [[ $# -gt 0 ]]; do
|
|||||||
chunk_minutes=$2
|
chunk_minutes=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-h|--help) usage; exit 0 ;;
|
-h | --help)
|
||||||
--) shift; break ;;
|
usage
|
||||||
-*) usage >&2; exit 1 ;;
|
exit 0
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
*) break ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -103,6 +118,8 @@ for tool in "${dependencies[@]}"; do
|
|||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
PYANNOTE_API_KEY_REF="op://API Keys/pyannote-api/credential"
|
||||||
|
|
||||||
# Explicit environment keys also work in headless sessions without 1Password.
|
# Explicit environment keys also work in headless sessions without 1Password.
|
||||||
# Resolve both credentials before starting any paid requests.
|
# Resolve both credentials before starting any paid requests.
|
||||||
if "$diarization" && [[ -z ${PYANNOTE_API_KEY:-} ]]; then
|
if "$diarization" && [[ -z ${PYANNOTE_API_KEY:-} ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user