diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 0e4149a2c..db450c0ad 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -2,7 +2,7 @@ name: Build on: push: branches: - master + - master workflow_dispatch: jobs: @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build SDist run: pipx run build --sdist @@ -25,14 +25,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2019, macos-11] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.12.3 + uses: pypa/cibuildwheel@v2.16.2 - name: Upload uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index 6d2dbdd2d..b07826f89 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ CMakeFiles CTestTestfile.cmake DartConfiguration.tcl cmake_install.cmake - +venv/ .tox diff --git a/CMakeLists.txt b/CMakeLists.txt index e363bbd0f..ce7eb35eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.14) # I like pie -project(PocketSphinx VERSION 5.0.2 +project(PocketSphinx VERSION 5.0.3 DESCRIPTION "A small speech recognizer" HOMEPAGE_URL "https://github.com/cmusphinx/pocketsphinx" LANGUAGES C) diff --git a/Dockerfile b/Dockerfile index 2862c65b2..f7780d67d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:latest as runtime -RUN apk add --no-cache python3 py3-pip sox +RUN apk add --no-cache python3 py3-pip sox portaudio alsa-utils alsaconf FROM runtime as build RUN apk add --no-cache cmake ninja gcc musl-dev python3-dev pkgconfig @@ -13,10 +13,7 @@ RUN CMAKE_ARGS="-DUSE_INSTALLED_POCKETSPHINX=ON" pip wheel -v . FROM runtime COPY --from=build /usr/local/ /usr/local/ COPY --from=build /pocketsphinx/*.whl / -RUN pip install /*.whl && rm /*.whl +RUN pip install --break-system-packages /*.whl && rm /*.whl -RUN adduser -u 1000 -DHD pocketsphinx && adduser pocketsphinx audio COPY examples/ /work/examples/ -RUN chown -R pocketsphinx:pocketsphinx /work -USER pocketsphinx WORKDIR /work diff --git a/MANIFEST.in b/MANIFEST.in index 414beadf8..2e81f3fb6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -45,3 +45,4 @@ recursive-exclude * *.DS_Store recursive-exclude * __pycache__ recursive-exclude * *.so recursive-exclude * *.egg-info +recursive-exclude venv * \ No newline at end of file diff --git a/NEWS b/NEWS index c3b44d84e..343caea0b 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,9 @@ -PocketSphinx 5.0.0 +PocketSphinx 5.0.3 ^^^^^^^^^^^^^^^^^^ -Not released yet! +The NEWS file has not been updated for some time. See the GitHub +releases page at https://github.com/cmusphinx/pocketsphinx/releases +instead. Pocketsphinx 0.8 ^^^^^^^^^^^^^^^^ diff --git a/README.md b/README.md index 8fd80bdbc..d0883dd07 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -PocketSphinx 5.0.2 +PocketSphinx 5.0.3 ================== This is PocketSphinx, one of Carnegie Mellon University's open source large diff --git a/cython/README.md b/cython/README.md index 7b45ce629..bc390f927 100644 --- a/cython/README.md +++ b/cython/README.md @@ -1,4 +1,4 @@ -PocketSphinx 5.0.2 +PocketSphinx 5.0.3 ================== This is PocketSphinx, one of Carnegie Mellon University's open source large diff --git a/docs/source/conf.py b/docs/source/conf.py index c1a7be042..1626c76f2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,11 +18,11 @@ # -- Project information ----------------------------------------------------- project = 'PocketSphinx' -copyright = '2022, David Huggins-Daines' +copyright = '2023, David Huggins-Daines' author = 'David Huggins-Daines' # The full version, including alpha/beta/rc tags -release = '5.0.2' +release = '5.0.3' # -- General configuration --------------------------------------------------- diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt index 7b42f7b65..c392af12e 100644 --- a/doxygen/CMakeLists.txt +++ b/doxygen/CMakeLists.txt @@ -1,6 +1,6 @@ find_package(Doxygen) if(DOXYGEN_FOUND) - set(DOXYGEN_PROJECT_NUMBER 5.0.2) + set(DOXYGEN_PROJECT_NUMBER 5.0.3) set(DOXYGEN_EXAMPLE_PATH ${CMAKE_SOURCE_DIR}/examples) set(DOXYGEN_SORT_MEMBER_DOCS NO) set(DOXYGEN_USE_MATHJAX YES) diff --git a/include/pocketsphinx.h b/include/pocketsphinx.h index 879689aea..4dbcd7b04 100644 --- a/include/pocketsphinx.h +++ b/include/pocketsphinx.h @@ -1095,8 +1095,8 @@ void ps_get_all_time(ps_decoder_t *ps, double *out_nspeech, /** * @mainpage PocketSphinx API Documentation * @author David Huggins-Daines - * @version 5.0.2 - * @date July 31, 2023 + * @version 5.0.3 + * @date December 28, 2023 * * @tableofcontents{HTML:1} * diff --git a/programs/pocketsphinx_main.c b/programs/pocketsphinx_main.c index c0ef64381..c202a67a7 100644 --- a/programs/pocketsphinx_main.c +++ b/programs/pocketsphinx_main.c @@ -338,6 +338,7 @@ output_hyp(ps_endpointer_t *ep, ps_decoder_t *decoder, ps_alignment_t *alignment --maxlen; *ptr = '\0'; puts(hyp_json); + fflush(stdout); ckd_free(hyp_json); } @@ -716,6 +717,7 @@ print_config(ps_config_t *config) { if (puts(ps_config_serialize_json(config)) < 0) return -1; + fflush(stdout); return 0; } diff --git a/pyproject.toml b/pyproject.toml index a8731358a..e14b2b8a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,11 @@ authors = [ {name = "David Huggins-Daines", email = "dhdaines@gmail.com"} ] keywords = ["asr", "speech"] +dependencies = ["sounddevice"] classifiers = [ "Development Status :: 6 - Mature", "Programming Language :: C", + "Programming Language :: Cython", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -25,6 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", + "Topic :: Multimedia :: Sound/Audio :: Speech", ] [project.urls] @@ -34,19 +37,25 @@ Repository = "https://github.com/cmusphinx/pocketsphinx.git" Issues = "https://github.com/cmusphinx/pocketsphinx/issues" [tool.cibuildwheel] -# Build the versions found in Ubuntu LTS, the stable PyPy, and 3.10 -# everywhere else +# Build a reduced selection of binaries as there are tons of them build = [ - "pp38*", - "cp36-manylinux_*", - "cp38-manylinux_*", + "pp310*", + "cp38-*", "cp310-*", - "cp311-*" + "cp311-*", + "cp312-*", ] -# PyPy 3.8 will choke on CPython 3.8 build leftovers... -before-build = "rm -rf _skbuild" -# PyPy builds are broken on Windows, and skip 32-bit and musl -skip = ["*musl*", "*_i686", "*-win32", "pp*win*"] +# Build only universal wheels for Mac where possible, and skip 32-bit +# builds to avoid building a gigabyte of stuff all the time +skip = [ + "cp*-macosx_x86_64", + "cp*-macosx_arm64", + "*_i686", + "*-win32", +] + +[tool.cibuildwheel.macos] +archs = ["x86_64", "universal2", "arm64"] [tool.isort] profile = "black"