mirror of
https://github.com/xzeldon/whisper-api-server.git
synced 2025-07-13 18:14:38 +03:00
Compare commits
4 Commits
7b0797cca1
...
0.1.2
Author | SHA1 | Date | |
---|---|---|---|
dde206facd | |||
2e92dd91cb | |||
dacad9a4f6
|
|||
7d6be4b7d3
|
14
README.md
14
README.md
@ -11,6 +11,20 @@ This API server enables audio transcription using the OpenAI Whisper models.
|
|||||||
|
|
||||||
# Build from source
|
# Build from source
|
||||||
|
|
||||||
|
Before build make sure that **CGO_ENABLED** env is set to **1**
|
||||||
|
|
||||||
|
```
|
||||||
|
set CGO_ENABLED 1
|
||||||
|
```
|
||||||
|
|
||||||
|
or preferable set it parament. Then check it via
|
||||||
|
|
||||||
|
```
|
||||||
|
go env
|
||||||
|
```
|
||||||
|
|
||||||
|
Also you have to have installed gcc x64 i.e. by MYSYS
|
||||||
|
|
||||||
Download the sources and use `go build`.
|
Download the sources and use `go build`.
|
||||||
For example, you can build using the following command:
|
For example, you can build using the following command:
|
||||||
|
|
||||||
|
@ -41,9 +41,6 @@ func InitializeWhisperState(modelPath string) (*WhisperState, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
params.AddFlags(whisper.FlagNoContext)
|
|
||||||
params.AddFlags(whisper.FlagTokenTimestamps)
|
|
||||||
|
|
||||||
fmt.Printf("Params CPU Threads : %d\n", params.CpuThreads())
|
fmt.Printf("Params CPU Threads : %d\n", params.CpuThreads())
|
||||||
|
|
||||||
return &WhisperState{
|
return &WhisperState{
|
||||||
|
@ -86,6 +86,16 @@ func (this *FullParams) RemoveFlags(newflag eFullParamsFlags) {
|
|||||||
this.cStruct.Flags = this.cStruct.Flags ^ newflag
|
this.cStruct.Flags = this.cStruct.Flags ^ newflag
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *FullParams) SetLanguage(language eLanguage) {
|
||||||
|
if this == nil {
|
||||||
|
return
|
||||||
|
} else if this.cStruct == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cStruct.Language = language
|
||||||
|
}
|
||||||
|
|
||||||
/*using pfnNewSegment = HRESULT( __cdecl* )( iContext* ctx, uint32_t n_new, void* user_data ) noexcept;*/
|
/*using pfnNewSegment = HRESULT( __cdecl* )( iContext* ctx, uint32_t n_new, void* user_data ) noexcept;*/
|
||||||
type NewSegmentCallback_Type func(context *IContext, n_new uint32, user_data unsafe.Pointer) EWhisperHWND
|
type NewSegmentCallback_Type func(context *IContext, n_new uint32, user_data unsafe.Pointer) EWhisperHWND
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user