Commit b516273 1 parent 8b8313c commit b516273 Copy full SHA for b516273
File tree 2 files changed +24
-2
lines changed
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ PKG_CPPFLAGS += -DSTRICT_R_HEADERS -I./dr_libs -I./whisper_cpp/ggml/include -I./
6
6
SOURCES = whisper_cpp/ggml/src/ggml-quants.c whisper_cpp/ggml/src/ggml-backend.c whisper_cpp/ggml/src/ggml-alloc.c whisper_cpp/ggml/src/ggml-aarch64.c whisper_cpp/ggml/src/ggml.c
7
7
OBJECTS = whisper_cpp/ggml/src/ggml-quants.o whisper_cpp/ggml/src/ggml-backend.o whisper_cpp/ggml/src/ggml-alloc.o whisper_cpp/ggml/src/ggml-aarch64.o whisper_cpp/ggml/src/ggml.o
8
8
9
- SOURCES += whisper_cpp/src/whisper.cpp rcpp_whisper .cpp RcppExports.cpp
10
- OBJECTS += whisper_cpp/src/whisper.o rcpp_whisper .o RcppExports.o
9
+ SOURCES += whisper_cpp/src/whisper.cpp rcpp_whisper_utils .cpp RcppExports.cpp
10
+ OBJECTS += whisper_cpp/src/whisper.o rcpp_whisper_utils .o RcppExports.o
11
11
12
12
all: $(SHLIB)
13
13
Original file line number Diff line number Diff line change
1
+ #include < Rcpp.h>
2
+
3
+
4
+ #include " whisper.h"
5
+
6
+ // [[Rcpp::export]]
7
+ Rcpp::DataFrame whisper_language_info () {
8
+ auto max_id = whisper_lang_max_id ();
9
+ std::vector<int > id;
10
+ std::vector<std::string> language;
11
+ std::vector<std::string> label;
12
+ for (int i = 0 ; i <= max_id; ++i) {
13
+ id.push_back (i);
14
+ language.push_back (whisper_lang_str (i));
15
+ label.push_back (whisper_lang_str_full (i));
16
+ }
17
+ return Rcpp::DataFrame::create (
18
+ Rcpp::Named (" id" ) = id,
19
+ Rcpp::Named (" language" ) = language,
20
+ Rcpp::Named (" language_label" ) = label,
21
+ Rcpp::Named (" stringsAsFactors" ) = false );
22
+ }
You can’t perform that action at this time.
0 commit comments