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.
go : adding features to the go-whisper example, go ci, etc (ggerganov…
…#384) * Updated bindings so they can be used in third pary packages. * Updated makefiles to set FMA flag on optionally, for xeon E5 on Darwin * Added test script * Changes for examples * Reverted * Made the NewContext method private
- Loading branch information
1 parent
850b55a
commit c560b8b
Showing
10 changed files
with
369 additions
and
30 deletions.
There are no files selected for viewing
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,17 @@ | ||
name: Bindings Tests | ||
on: | ||
push: | ||
paths: | ||
- bindings/go/** | ||
|
||
jobs: | ||
ubuntu-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '^1.19' | ||
- uses: actions/checkout@v1 | ||
- run: | | ||
cd bindings/go | ||
make test |
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 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// CONSTANTS | ||
|
||
const ( | ||
Reset = "\033[0m" | ||
RGBPrefix = "\033[38;5;" // followed by RGB values in decimal format separated by colons | ||
RGBSuffix = "m" | ||
) | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
// PUBLIC METHODS | ||
|
||
// Colorize text with RGB values, from 0 to 23 | ||
func Colorize(text string, v int) string { | ||
// https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit | ||
// Grayscale colors are in the range 232-255 | ||
return RGBPrefix + fmt.Sprint(v%24+232) + RGBSuffix + text + Reset | ||
} |
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
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
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
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
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
Oops, something went wrong.