mirror of https://github.com/drowe67/LPCNet.git
CMake working, and some READNE tweaks
parent
f93c2e6757
commit
2f852d6a3c
|
@ -5,7 +5,7 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(LPCNet C)
|
||||
|
||||
set(CMAKE_C_FLAGS "-Wall -W -Wextra -Wno-unused-function -O3 -g -I../include -MD ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "-Wall -W -Wextra -Wno-unused-function -O3 -g -I. -MD ${CMAKE_C_FLAGS}")
|
||||
|
||||
execute_process(COMMAND grep -c "avx2" /proc/cpuinfo
|
||||
OUTPUT_VARIABLE AVX2)
|
||||
|
@ -35,15 +35,17 @@ set(LPCNET_ROOT http://rowetel.com/downloads/deep/)
|
|||
set(LPCNET_FILE lpcnet_190215.tgz)
|
||||
set(LPCNET_URL ${LPCNET_ROOT}${LPCNET_FILE})
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11.4)
|
||||
if(NOT EXISTS ${LPCNET_FILE})
|
||||
file(DOWNLOAD ${LPCNET_URL}
|
||||
${CMAKE_BINARY_DIR}/${LPCNET_FILE}
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
execute_process(COMMAND tar xzf ${LPCNET_FILE} -C ${CMAKE_BINARY_DIR}/src)
|
||||
execute_process(COMMAND tar -xzf ${CMAKE_BINARY_DIR}/${LPCNET_FILE} -C ${CMAKE_BINARY_DIR}/src)
|
||||
#execute_process(COMMAND sh -c "cp /home/david/LPCNet/src/${LPCNET_FILE} .; tar xzf ${CMAKE_BINARY_DIR}/${LPCNET_FILE} -C ${CMAKE_BINARY_DIR}/src" )
|
||||
endif()
|
||||
set(lpcnet_SOURCE_DIR ${CMAKE_BINARY_DIR}/src)
|
||||
else()
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
|
@ -55,4 +57,5 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
set(lpcnet_SOURCE_DIR ${CMAKE_BINARY_DIR}/src)
|
||||
|
||||
|
|
|
@ -14,12 +14,13 @@ $ make
|
|||
Unquantised LPCNet:
|
||||
|
||||
```
|
||||
sox wav/wia.wav -t raw -r 16000 - | ./dump_data --c2pitch --test - - | ./test_lpcnet - - | aplay -f S16_LE -r 16000
|
||||
$ cd ~/LPCNet/src
|
||||
$ sox ../../wav/wia.wav -t raw -r 16000 - | ./dump_data --c2pitch --test - - | ./test_lpcnet - - | aplay -f S16_LE -r 16000
|
||||
```
|
||||
|
||||
LPCNet at 1733 bits/s using direct-split quantiser:
|
||||
```
|
||||
sox wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s | aplay -f S16_LE -r 16000
|
||||
sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s | aplay -f S16_LE -r 16000
|
||||
```
|
||||
|
||||
# Reading Further
|
||||
|
|
|
@ -14,7 +14,7 @@ set(lpcnet_freedv_srcs
|
|||
4stage_direct_split_vq.c
|
||||
lpcnet.c
|
||||
nnet.c
|
||||
${lpcnet_SOURCE_DIR}/nnet_data.c
|
||||
nnet_data.c
|
||||
)
|
||||
|
||||
add_library(lpcnetfreedv STATIC ${lpcnet_freedv_srcs})
|
||||
|
|
Loading…
Reference in New Issue