Skip to content

Commit

Permalink
Merge pull request #382 from xmos/release/v0.5.1
Browse files Browse the repository at this point in the history
Release/v0.5.1
  • Loading branch information
shuchitak authored Sep 20, 2022
2 parents 8c5999f + 70b01c2 commit d60a4ea
Show file tree
Hide file tree
Showing 89 changed files with 428 additions and 7,810 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
XMOS Voice Framework Change Log
===============================

0.5.1
-----

* ADDED: Windows documentation
* REMOVED: VAD module
* CHANGED: Git hash at which lib_tflite_micro is fetched during CMake FetchContent

0.5.0
-----

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "In-source build is not allowed! Please specify a build folder.\n\tex:cmake -B build")
endif()

project(sw_fwk_voice)
project(fwk_voice)

enable_language(CXX C ASM)

Expand Down
120 changes: 30 additions & 90 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,48 +53,10 @@ pipeline {
}
stage('CMake') {
steps {
dir("${REPO}") {
sh "mkdir build"
}
// Do x86 versions first because it's hard to glob just for extensionless files
dir("${REPO}/build") {
viewEnv() {
withVenv {
sh "cmake --version"
sh 'cmake -S.. -DPython3_FIND_VIRTUALENV="ONLY" -DTEST_WAV_ADEC_BUILD_CONFIG="1 2 2 10 5" -DFWK_VOICE_BUILD_TESTS=ON'
sh "make -j8"
}
}
}
// We do this again on the NUCs for verification later, but this just checks we have no build error
dir("${REPO}/test/lib_ic/py_c_frame_compare") {
viewEnv() {
withVenv {
runPython("python build_ic_frame_proc.py")
}
}
}
// We do this again on the NUCs for verification later, but this just checks we have no build error
dir("${REPO}/test/lib_vnr/py_c_feature_compare") {
viewEnv() {
withVenv {
runPython("python build_vnr_feature_extraction.py")
}
}
}
dir("${REPO}") {
stash name: 'cmake_build_x86_examples', includes: 'build/**/fwk_voice_example_bare_metal_*'
// We are archveing the x86 version. Be careful - these have the same file name as the xcore versions but the linker should warn at least in this case
stash name: 'cmake_build_x86_libs', includes: 'build/**/*.a'
archiveArtifacts artifacts: "build/**/fwk_voice_example_bare_metal_*", fingerprint: true
stash name: 'vnr_py_c_feature_compare', includes: 'test/lib_vnr/py_c_feature_compare/build/**'
stash name: 'py_c_frame_compare', includes: 'test/lib_ic/py_c_frame_compare/build/**'
}
// Now do xcore files
// Do xcore files
dir("${REPO}/build") {
viewEnv() {
withVenv {
sh 'rm CMakeCache.txt'
script {
if (env.FULL_TEST == "1") {
sh 'cmake -S.. -DCMAKE_TOOLCHAIN_FILE=../xmos_cmake_toolchain/xs3a.cmake -DPython3_VIRTUALENV_FIND="ONLY" -DFWK_VOICE_BUILD_TESTS=ON'
Expand All @@ -108,6 +70,7 @@ pipeline {
}
}
dir("${REPO}") {
// Stash all executables and xscope_fileio
stash name: 'cmake_build_xcore', includes: 'build/**/*.xe, build/**/conftest.py, build/**/xscope_fileio/**'
}
}
Expand Down Expand Up @@ -146,9 +109,6 @@ pipeline {
}
stage('Make/get bins and libs'){
steps {
dir("${REPO}") {
sh "mkdir build"
}
// Build x86 versions locally as we had problems with moving bins and libs over from previous build due to brew
dir("${REPO}/build") {
viewEnv() {
Expand All @@ -163,6 +123,29 @@ pipeline {
}
}
}
// We do this again on the NUCs for verification later, but this just checks we have no build error
dir("${REPO}/test/lib_ic/py_c_frame_compare") {
viewEnv() {
withVenv {
runPython("python build_ic_frame_proc.py")
}
}
}
// We do this again on the NUCs for verification later, but this just checks we have no build error
dir("${REPO}/test/lib_vnr/py_c_feature_compare") {
viewEnv() {
withVenv {
runPython("python build_vnr_feature_extraction.py")
}
}
}
dir("${REPO}/test/stage_b") {
viewEnv() {
withVenv {
runPython("python build_c_code.py")
}
}
}
dir("${REPO}") {
unstash 'cmake_build_xcore'
}
Expand Down Expand Up @@ -206,14 +189,6 @@ pipeline {
sh "mv output.wav ic_example_output.wav"
}
}
archiveArtifacts artifacts: "ic_example_output.wav", fingerprint: true
}
dir("${REPO}/examples/bare-metal/vad") {
viewEnv() {
withVenv {
sh "python ../shared_src/python/run_xcoreai.py ../../../build/examples/bare-metal/vad/bin/fwk_voice_example_bare_metal_vad.xe"
}
}
}
dir("${REPO}/examples/bare-metal/pipeline_single_threaded") {
viewEnv() {
Expand Down Expand Up @@ -300,43 +275,6 @@ pipeline {
}
}
}
stage('VAD vad_unit_tests') {
steps {
dir("${REPO}/test/lib_vad/vad_unit_tests") {
viewEnv() {
withVenv {
sh "pytest -n 2 --junitxml=pytest_result.xml"
junit "pytest_result.xml"
}
}
}
}
}
stage('VAD compare_xc_c') {
steps {
dir("${REPO}/test/lib_vad/compare_xc_c") {
viewEnv() {
withVenv {
sh "pytest -s --junitxml=pytest_result.xml"
junit "pytest_result.xml"
}
}
}
}
}
stage('VAD test_profile') {
steps {
dir("${REPO}/test/lib_vad/test_vad_profile") {
viewEnv() {
withVenv {
sh "pytest -s --junitxml=pytest_result.xml"
junit "pytest_result.xml"
}
}
archiveArtifacts artifacts: "vad_profile_report.log", fingerprint: true
}
}
}
stage('NS profile test') {
steps {
dir("${REPO}/test/lib_ns/test_ns_profile") {
Expand Down Expand Up @@ -408,7 +346,6 @@ pipeline {
junit "pytest_result.xml"
}
}
archiveArtifacts artifacts: "ic_prof.log", fingerprint: true
}
}
}
Expand All @@ -429,7 +366,6 @@ pipeline {
//sh "python plot_ic.py"
}
}
archiveArtifacts artifacts: "ic_spec_summary.txt", fingerprint: true
}
}
}
Expand Down Expand Up @@ -486,7 +422,6 @@ pipeline {
withVenv {
withMounts([["projects", "projects/hydra_audio", "hydra_audio_stage_b_tests"]]) {
withEnv(["hydra_audio_PATH=$hydra_audio_stage_b_tests_PATH"]) {
runPython("python build_c_code.py")
sh "pytest -s --junitxml=pytest_result.xml"
junit "pytest_result.xml"
}
Expand Down Expand Up @@ -693,8 +628,13 @@ pipeline {
}// stages
post {
always {
// Examples artifacts
archiveArtifacts artifacts: "${REPO}/build/**/fwk_voice_example_bare_metal_*", fingerprint: true
// AEC aretfacts
archiveArtifacts artifacts: "${REPO}/test/lib_adec/test_adec_profile/**/adec_prof*.log", fingerprint: true
// IC artefacts
archiveArtifacts artifacts: "${REPO}/test/lib_ic/test_ic_profile/ic_prof.log", fingerprint: true
archiveArtifacts artifacts: "${REPO}/test/lib_ic/test_ic_spec/ic_spec_summary.txt", fingerprint: true
// NS artefacts
archiveArtifacts artifacts: "${REPO}/test/lib_ns/test_ns_profile/ns_prof.log", fingerprint: true
// VNR artifacts
Expand Down
3 changes: 0 additions & 3 deletions doc/Doxyfile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ INPUT += ../modules/lib_adec/api
# IC module
INPUT += ../modules/lib_ic/api

# VAD module
INPUT += ../modules/lib_vad/api

# VNR module
INPUT += ../modules/lib_vnr/api/common
INPUT += ../modules/lib_vnr/api/features
Expand Down
77 changes: 55 additions & 22 deletions doc/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Requirements
------------

* XTC Tools 15.0.6 or higher
* A clone of the `xcore_sdk <https://github.com/xmos/xcore_sdk/>`_, with its submodules initialised
* CMake 3.20 or higher
* Python 3.7 or higher

Expand All @@ -17,37 +16,71 @@ Building
The following instructions show how to build the Voice Framework and run one of the example applications. This
procedure is currently supported on MacOS and Linux only.

#. Enter the clone of the Voice Framework and initialise submodules
.. code-block:: console
1. Enter the clone of the Voice Framework and initialise submodules

cd fwk_voice
git submodule update --init --recursive
.. code-block:: console
#. Create a build directory
.. code-block:: console
cd fwk_voice
git submodule update --init --recursive
mkdir build
cd build
2. Create a build directory

#. Run cmake to setup the build environment for the XMOS toolchain
.. code-block:: console
.. code-block:: console
cmake -S.. -DCMAKE_TOOLCHAIN_FILE=../xmos_cmake_toolchain/xs3a.cmake
mkdir build
cd build
#. Running make will then build the Voice Framework libraries and example applications
.. code-block:: console
3. Run cmake to setup the build environment for the XMOS toolchain

make
.. tab:: Linux and Mac

#. Install dependencies
.. code-block:: console
.. code-block:: console
pip install -e build/fwk_voice_deps/xscope_fileio/
cmake -S.. -DCMAKE_TOOLCHAIN_FILE=../xmos_cmake_toolchain/xs3a.cmake
#. Run the single-threaded AEC example
.. code-block:: console
.. tab:: Windows

cd ../examples/bare-metal/aec_1_thread
python ../shared_src/python/run_xcoreai.py ../../../build/examples/bare-metal/aec_1_thread/bin/fwk_voice_example_bare_metal_aec_1_thread.xe --input ../shared_src/test_streams/aec_example_input.wav
.. code-block:: console
cmake -G "NMake Makefiles" -S.. -DCMAKE_TOOLCHAIN_FILE=../xmos_cmake_toolchain/xs3a.cmake
4. Running make will then build the Voice Framework libraries and example applications

.. tab:: Linux and Mac

.. code-block:: console
make fwk_voice_example_bare_metal_aec_1_thread
.. tab:: Windows

.. code-block:: console
nmake fwk_voice_example_bare_metal_aec_1_thread
5. Install dependencies

.. tab:: Linux and Mac

.. code-block:: console
pip install -e build/fwk_voice_deps/xscope_fileio/
.. tab:: Windows

.. code-block:: console
pip install -e fwk_voice_deps/xscope_fileio
cd fwk_voice_deps/xscope_fileio/host
cmake -G "NMake Makefiles" .
nmake
cd ../../../
6. Run the single-threaded AEC example

.. code-block:: console
cd ../examples/bare-metal/aec_1_thread
python ../shared_src/python/run_xcoreai.py ../../../build/examples/bare-metal/aec_1_thread/bin/fwk_voice_example_bare_metal_aec_1_thread.xe --input ../shared_src/test_streams/aec_example_input.wav
See :ref:`examples` for full details about the example applications.
1 change: 0 additions & 1 deletion doc/user_guide/audio_processing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ AUDIO FEATURES
../../../modules/lib_agc/doc/index
../../../modules/lib_adec/doc/index
../../../modules/lib_ic/doc/index
../../../modules/lib_vad/doc/index
../../../modules/lib_vnr/doc/index

EXAMPLES
Expand Down
11 changes: 7 additions & 4 deletions examples/bare-metal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ set( CONFIG_XSCOPE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/shared_src/etc )
add_subdirectory( shared_src )

add_subdirectory( ic )
add_subdirectory( vad )

add_subdirectory( aec_1_thread )

add_subdirectory( agc )

add_subdirectory( pipeline_single_threaded )
add_subdirectory( pipeline_alt_arch )

add_subdirectory(vnr)
add_subdirectory( vnr )

## Multi thread example builds only on XCORE
if(${CMAKE_SYSTEM_NAME} STREQUAL XCORE_XS3A)
#TODO move vad back to all examples when we can build it

add_subdirectory( aec_2_threads )

add_subdirectory( pipeline_multi_threaded )
endif()

add_subdirectory( pipeline_alt_arch )
Loading

0 comments on commit d60a4ea

Please sign in to comment.