forked from ggerganov/whisper.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding ruby bindings * avoid adding these they are copied in via extconf.rb * ignore these files here * add definitions for boolean params * initial transcribe for ruby * use en model and transcribe jfk with assertion * possibly this works for building ruby binding * ci : try to add ruby workflow --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
- Loading branch information
Showing
7 changed files
with
630 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/bindings.yml → .github/workflows/bindings-go.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Bindings Tests | ||
name: Bindings Tests (Go) | ||
on: | ||
push: | ||
paths: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Bindings Tests (Ruby) | ||
on: | ||
push: | ||
paths: | ||
- bindings/ruby/** | ||
- whisper.h | ||
pull_request: | ||
paths: | ||
- bindings/ruby/** | ||
- whisper.h | ||
|
||
jobs: | ||
ubuntu-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
- uses: actions/checkout@v1 | ||
- run: | | ||
cd bindings/ruby/ext | ||
ruby extconf.rb && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Makefile | ||
ggml.c | ||
ggml.h | ||
whisper.bundle | ||
whisper.cpp | ||
whisper.h | ||
dr_wav.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'mkmf' | ||
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','whisper.cpp')} .") | ||
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','whisper.h')} .") | ||
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml.h')} .") | ||
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','ggml.c')} .") | ||
system("cp #{File.join(File.dirname(__FILE__),'..','..','..','examples','dr_wav.h')} .") | ||
|
||
|
||
# need to use c++ compiler flags | ||
$CXXFLAGS << ' -std=c++11' | ||
# Set to true when building binary gems | ||
if enable_config('static-stdlib', false) | ||
$LDFLAGS << ' -static-libgcc -static-libstdc++' | ||
end | ||
|
||
if enable_config('march-tune-native', false) | ||
$CFLAGS << ' -march=native -mtune=native' | ||
$CXXFLAGS << ' -march=native -mtune=native' | ||
end | ||
|
||
create_makefile('whisper') |
Oops, something went wrong.