Delete summarize

This commit is contained in:
Sangye Ince-Johannsen 2024-11-14 09:18:10 +01:00
parent 810d7e254a
commit 33f2a60b11

View file

@ -1,39 +0,0 @@
#!/bin/bash
# Check if a filename has been provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <filename>"
exit 1
fi
filename="$1"
# Check if the file exists
if [ ! -f "$filename" ]; then
echo "Error: File does not exist."
exit 1
fi
# Assuming GLOBAL_API_KEY is exported in your environment
if [ -z "$GLOBAL_API_KEY" ]; then
echo "Error: GLOBAL_API_KEY is not set."
exit 1
fi
# Endpoint
endpoint="https://api.sij.ai/speaksummary"
# Make the request
curl -X POST "$endpoint" \
-H "Authorization: Bearer $GLOBAL_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@$filename" \
-o "response.wav"
# Check if the output was saved successfully
if [ -f "response.wav" ]; then
echo "The summary has been processed and saved as 'response.wav'"
else
echo "Failed to save the summary."
fi