Skip to content

Commit

Permalink
Add CLI program to whisperfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Jul 31, 2024
1 parent fd891be commit 94e9629
Show file tree
Hide file tree
Showing 10 changed files with 1,751 additions and 15 deletions.
1 change: 0 additions & 1 deletion stable-diffusion.cpp/BUILD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ STABLE_DIFFUSION_CPP_SRCS_CPP = $(filter %.cpp,$(STABLE_DIFFUSION_CPP_FILES))
STABLE_DIFFUSION_CPP_SRCS = $(STABLE_DIFFUSION_CPP_SRCS_C) $(STABLE_DIFFUSION_CPP_SRCS_CPP)

STABLE_DIFFUSION_CPP_OBJS = \
$(LLAMAFILE_OBJS) \
$(STABLE_DIFFUSION_CPP_SRCS_C:%.c=o/$(MODE)/%.o) \
$(STABLE_DIFFUSION_CPP_SRCS_CPP:%.cpp=o/$(MODE)/%.o)

Expand Down
34 changes: 20 additions & 14 deletions whisper.cpp/BUILD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,43 @@
PKGS += WHISPER_CPP

WHISPER_CPP_FILES := $(wildcard whisper.cpp/*.*)
WHISPER_CPP_HDRS = $(filter %.h,$(WHISPER_CPP_FILES)) \
$(filter %.hpp,$(WHISPER_CPP_FILES))
WHISPER_CPP_INCS = $(filter %.inc,$(WHISPER_CPP_FILES))
WHISPER_CPP_SRCS_C = $(filter %.c,$(WHISPER_CPP_FILES))
WHISPER_CPP_SRCS_CPP = $(filter %.cpp,$(WHISPER_CPP_FILES))
WHISPER_CPP_SRCS = $(WHISPER_CPP_SRCS_C) $(WHISPER_CPP_SRCS_CPP)

WHISPER_CPP_OBJS = \
$(LLAMAFILE_OBJS) \
WHISPER_CPP_HDRS = \
$(filter %.h,$(WHISPER_CPP_FILES)) \
$(filter %.hpp,$(WHISPER_CPP_FILES))

WHISPER_CPP_OBJS = \
$(WHISPER_CPP_SRCS_C:%.c=o/$(MODE)/%.o) \
$(WHISPER_CPP_SRCS_CPP:%.cpp=o/$(MODE)/%.o)

o/$(MODE)/whisper.cpp/whisper.cpp.a: $(WHISPER_CPP_OBJS)

$(WHISPER_CPP_OBJS): private \
CCFLAGS += \
$(WHISPER_CPP_OBJS): private \
CCFLAGS += \
-DGGML_MULTIPLATFORM

$(WHISPER_CPP_OBJS): private \
CXXFLAGS += \
-frtti \
-Wno-alloc-size-larger-than \
$(WHISPER_CPP_OBJS): private \
CXXFLAGS += \
-frtti \
-Wno-alloc-size-larger-than \
-Wno-deprecated-declarations

o/$(MODE)/whisper.cpp/server: \
o/$(MODE)/whisper.cpp/server.o \
o/$(MODE)/whisper.cpp/whisper.cpp.a \
o/$(MODE)/whisper.cpp/server: \
o/$(MODE)/whisper.cpp/server.o \
o/$(MODE)/whisper.cpp/whisper.cpp.a \
o/$(MODE)/llama.cpp/llama.cpp.a

o/$(MODE)/whisper.cpp/main: \
o/$(MODE)/whisper.cpp/main.o \
o/$(MODE)/whisper.cpp/whisper.cpp.a \
o/$(MODE)/llama.cpp/llama.cpp.a

$(WHISPER_CPP_OBJS): whisper.cpp/BUILD.mk

.PHONY: o/$(MODE)/whisper.cpp
o/$(MODE)/whisper.cpp: \
o/$(MODE)/whisper.cpp: \
o/$(MODE)/whisper.cpp/server
17 changes: 17 additions & 0 deletions whisper.cpp/README.llamafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
DESCRIPTION

whisper.cpp converts .wav to .txt

LICENSE

MIT

ORIGIN

commit 6739eb83c3ca5cf40d24c6fe8442a761a1eb6248
Author: Georgi Gerganov <ggerganov@gmail.com>
Date: Sat Jul 27 20:35:04 2024 +0300

LOCAL MODIFICATIONS

- Integrate with llamafile file loader
2 changes: 2 additions & 0 deletions whisper.cpp/common.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// -*- mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
#define _USE_MATH_DEFINES // for M_PI

#include "common.h"
Expand Down
3 changes: 3 additions & 0 deletions whisper.cpp/common.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// -*- mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi

// Various helper functions and utilities

#pragma once
Expand Down
Loading

0 comments on commit 94e9629

Please sign in to comment.