Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Install Build Dependencies
run: sudo apt-get -y install doxygen swig
- name: Checkout
uses: actions/checkout@v3
- name: Install
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
pip install .
- name: Run tests
Expand Down
22 changes: 12 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14) # I like pie

project(PocketSphinx VERSION 4.9.999.0
project(PocketSphinx VERSION 5.0.0
DESCRIPTION "A small speech recognizer"
HOMEPAGE_URL "https://github.com/cmusphinx/pocketsphinx")
include(CMakePrintHelpers)
Expand Down Expand Up @@ -60,10 +60,6 @@ else()
add_compile_options(-Wall -Wextra)
endif()

option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
if(BUILD_SHARED_LIBS)
add_definitions(-DSPHINX_DLL)
endif()
option(FIXED_POINT "Build using fixed-point math" OFF)
if(NOT DEFAULT_RADIX)
set(DEFAULT_RADIX 12)
Expand All @@ -79,18 +75,24 @@ configure_file(config.h.in config.h)
configure_file(sphinx_config.h.in include/sphinxbase/sphinx_config.h)
add_definitions(-DHAVE_CONFIG_H)

add_subdirectory(src)
# Only build SWIG and Python if we are building the package
if(CALL_FROM_SETUP_PY)
add_subdirectory(swig)
# Python build
if(SKBUILD)
add_subdirectory(src)
add_subdirectory(cython)
else()
# Don't build or install these in Python
# C shared library build
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
if(BUILD_SHARED_LIBS)
add_definitions(-DSPHINX_DLL)
endif()
add_subdirectory(src)
add_subdirectory(model)
add_subdirectory(doc)
add_subdirectory(include)
add_subdirectory(programs)
add_subdirectory(test)
configure_file(pocketsphinx.pc.in pocketsphinx.pc @ONLY)
install(TARGETS pocketsphinx LIBRARY)
install(FILES ${CMAKE_BINARY_DIR}/pocketsphinx.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()

5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PocketSphinx 5.0.0
^^^^^^^^^^^^^^^^^^

Not released yet!

Pocketsphinx 0.8
^^^^^^^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PocketSphinx 5.0.0 prerelease
=============================
PocketSphinx 5.0.0 release candidate 1
======================================

This is PocketSphinx, one of Carnegie Mellon University's open source large
vocabulary, speaker-independent continuous speech recognition engines.
Expand Down
2 changes: 2 additions & 0 deletions cython/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.so
model
17 changes: 17 additions & 0 deletions cython/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
find_package(PythonExtensions REQUIRED)
find_package(Python COMPONENTS Interpreter Development)
find_package(Cython)

set_property(TARGET pocketsphinx PROPERTY POSITION_INDEPENDENT_CODE on)

add_cython_target(_pocketsphinx _pocketsphinx.pyx)
add_library(_pocketsphinx MODULE ${_pocketsphinx})
target_link_libraries(_pocketsphinx pocketsphinx)
target_include_directories(
_pocketsphinx PRIVATE ${PYTHON_INCLUDE_DIR}
_pocketsphinx PRIVATE ${PROJECT_SOURCE_DIR}/src
_pocketsphinx PRIVATE ${PROJECT_SOURCE_DIR}/include
_pocketsphinx PRIVATE ${CMAKE_BINARY_DIR} # for config.h
)
python_extension_module(_pocketsphinx)
install(TARGETS _pocketsphinx LIBRARY DESTINATION cython/pocketsphinx5)
Loading