From 024e999b9cee2938a7d8470f18493a773af678e3 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Wed, 18 Dec 2024 13:23:20 -0500 Subject: [PATCH] Supply HLS file for whisper integration test (#64) --- ci/fixtures/whisper/hls.m3u8 | 7 +++++++ ci/test.sh | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 ci/fixtures/whisper/hls.m3u8 diff --git a/ci/fixtures/whisper/hls.m3u8 b/ci/fixtures/whisper/hls.m3u8 new file mode 100644 index 0000000..2428728 --- /dev/null +++ b/ci/fixtures/whisper/hls.m3u8 @@ -0,0 +1,7 @@ +#EXTM3U +#EXT-X-VERSION:3 +#EXT-X-TARGETDURATION:10 +#EXT-X-MEDIA-SEQUENCE:0 +#EXTINF:10.007800, +112300.ts +#EXT-X-ENDLIST diff --git a/ci/test.sh b/ci/test.sh index a78b11d..ea9a7b9 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -63,9 +63,11 @@ for SERVICE in "${SERVICES[@]}"; do elif [ "$SERVICE" == "whisper" ]; then curl -s -o vtt.txt \ --header "Accept: text/plain" \ - --header "Apix-Ldp-Resource: https://github.com/ggerganov/whisper.cpp/raw/master/samples/jfk.wav" \ + --header "Content-Type: application/vnd.apple.mpegurl" \ + --header "Apix-Ldp-Resource: https://preserve.lehigh.edu/sites/default/files/derivatives/hls/node/8157/11230.m3u8" \ + --data-binary "@/fixtures/whisper/hls.m3u8" \ "$URL" - grep "ask not what your country can do for you" vtt.txt || exit 1 + grep -i "This podcast is brought to you by Illuminate" vtt.txt || exit 1 echo "VTT as expected" rm vtt.txt elif [ "$SERVICE" == "pandoc" ]; then @@ -82,8 +84,6 @@ for SERVICE in "${SERVICES[@]}"; do cat diff_output.txt exit 1 fi - - else echo "Unknown service" exit 1