Skip to content

Commit

Permalink
issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
absadiki committed Mar 25, 2023
1 parent 87e6d21 commit ab133ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="pywhispercpp",
version="1.0.6",
version="1.0.7",
author="abdeladim-s",
description="Python bindings for whisper.cpp",
long_description=long_description,
Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,10 @@ PYBIND11_MODULE(_pywhispercpp, m) {
.def_readwrite("audio_ctx", &whisper_full_params::audio_ctx)
.def_readwrite("prompt_tokens", &whisper_full_params::prompt_tokens)
.def_readwrite("prompt_n_tokens", &whisper_full_params::prompt_n_tokens)
.def_readwrite("language", &whisper_full_params::language)
.def_property("language", [](whisper_full_params &self) {return py::str(self.language);},
[](whisper_full_params &self, const char *new_c) {char* c = (char *)malloc(sizeof(new_c));
strcpy(c, new_c); self.language = c;})

.def_readwrite("suppress_blank", &whisper_full_params::suppress_blank)
.def_readwrite("suppress_non_speech_tokens", &whisper_full_params::suppress_non_speech_tokens)
.def_readwrite("temperature", &whisper_full_params::temperature)
Expand Down

0 comments on commit ab133ff

Please sign in to comment.