hbs2 commited on
Commit
fd87e9f
1 Parent(s): dc09f0f

Upload 3 files

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. Dockerfile +6 -0
  3. infer.py +7 -0
  4. jfk.flac +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ jfk.flac filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
2
+ WORKDIR /root
3
+ RUN apt-get update -y && apt-get install -y python3-pip
4
+ COPY infer.py jfk.flac ./
5
+ RUN pip3 install faster-whisper
6
+ CMD ["python3", "infer.py"]
infer.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from faster_whisper import WhisperModel
2
+
3
+ jfk_path = "jfk.flac"
4
+ model = WhisperModel("tiny", device="cuda")
5
+ segments, info = model.transcribe(jfk_path, word_timestamps=True)
6
+ for segment in segments:
7
+ print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
jfk.flac ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63a4b1e4c1dc655ac70961ffbf518acd249df237e5a0152faae9a4a836949715
3
+ size 1152693