Skip to content

Commit

Permalink
Merge pull request #166 from TeamOpenSmartGlasses/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
alex1115alex authored Jan 21, 2025
2 parents 10f9000 + 6b5d4ba commit 75364ac
Show file tree
Hide file tree
Showing 188 changed files with 35,815 additions and 2,096 deletions.
18 changes: 9 additions & 9 deletions SmartGlassesManager/SGM_android/SmartGlassesManager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
}

defaultConfig {
minSdk 30
minSdk 28
targetSdk 32
versionCode 3
versionName "0.1"
Expand Down Expand Up @@ -70,12 +70,12 @@ android {
// }
// }
//
// externalNativeBuild {
// cmake {
// path file('CMakeLists.txt')
// version '3.22.1'
// }
// }
externalNativeBuild {
cmake {
path file('src/main/cpp/liblc3/CMakeLists.txt')
version '3.22.1'
}
}

}

Expand Down Expand Up @@ -154,10 +154,10 @@ dependencies {
implementation 'com.microsoft.onnxruntime:onnxruntime-android:1.15.0'

//Vuzix Ultralite OEM Platform / Vuzix Z100
implementation 'com.vuzix:ultralite-sdk-android:1.4.1'
implementation 'com.vuzix:ultralite-sdk-android:1.8'

//Azure ASR
implementation "com.microsoft.cognitiveservices.speech:client-sdk:1.38.0"
implementation "com.microsoft.cognitiveservices.speech:client-sdk:1.42.0"

implementation project(path: ':AugmentOSLib')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.teamopensmartglasses.smartglassesmanager">

<uses-sdk android:minSdkVersion="34"
<uses-sdk android:minSdkVersion="28"
android:targetSdkVersion="34"
tools:overrideLibrary="com.vuzix.ultralite.sdk"
/>

<!-- NETWORK-->
Expand All @@ -27,13 +28,7 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

<!-- <queries>-->
<!-- <intent>-->
<!-- <action android:name="AUGMENTOS_INTENT" />-->
<!-- </intent>-->
<!-- </queries>-->

<queries>
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
# Builds the ogg and opus encoder library which used third party module.
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.18.1)

# set related path of third party libraries.
set(third_party_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party)
# Include Project 1
#add_subdirectory(${CMAKE_SOURCE_DIR}/google_opus_stuff)

# libogg library refer from https://github.com/xiph/ogg.
set(libogg_INCLUDE ${third_party_DIR}/libogg/include)
set(libogg_LIB ${third_party_DIR}/libogg/lib/${ANDROID_ABI})
add_library(lib_ogg STATIC IMPORTED)
set_target_properties(lib_ogg PROPERTIES IMPORTED_LOCATION ${libogg_LIB}/libogg.a)
# Include Project 2
add_subdirectory(${CMAKE_SOURCE_DIR}/liblc3)

# libopus library refer from https://github.com/xiph/opus.
set(libopus_INCLUDE ${third_party_DIR}/libopus/include)
set(libopus_LIB ${third_party_DIR}/libopus/lib/${ANDROID_ABI})
add_library(lib_opus STATIC IMPORTED)
set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION ${libopus_LIB}/libopus.a)

# opus-tools https://github.com/xiph/opus-tools.
set(opus_tools_INCLUDE ${third_party_DIR}/opus_tools/include)
set(opus_tools_LIB ${third_party_DIR}/opus_tools/lib/${ANDROID_ABI})
add_library(lib_opus_header STATIC IMPORTED)
set_target_properties(lib_opus_header PROPERTIES IMPORTED_LOCATION
${opus_tools_LIB}/libopus_header.a)

# Build ogg_opus_encoder_tool shared lib.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library(ogg_opus_encoder_tool SHARED ogg_opus_encoder.cc)
target_include_directories(ogg_opus_encoder_tool PRIVATE ${libogg_INCLUDE})
target_link_libraries(ogg_opus_encoder_tool lib_opus lib_ogg lib_opus_header)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builds the ogg and opus encoder library which used third party module.
cmake_minimum_required(VERSION 3.22.1)

# set related path of third party libraries.
set(third_party_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party)

# libogg library refer from https://github.com/xiph/ogg.
set(libogg_INCLUDE ${third_party_DIR}/libogg/include)
set(libogg_LIB ${third_party_DIR}/libogg/lib/${ANDROID_ABI})
add_library(lib_ogg STATIC IMPORTED)
set_target_properties(lib_ogg PROPERTIES IMPORTED_LOCATION ${libogg_LIB}/libogg.a)

# libopus library refer from https://github.com/xiph/opus.
set(libopus_INCLUDE ${third_party_DIR}/libopus/include)
set(libopus_LIB ${third_party_DIR}/libopus/lib/${ANDROID_ABI})
add_library(lib_opus STATIC IMPORTED)
set_target_properties(lib_opus PROPERTIES IMPORTED_LOCATION ${libopus_LIB}/libopus.a)

# opus-tools https://github.com/xiph/opus-tools.
set(opus_tools_INCLUDE ${third_party_DIR}/opus_tools/include)
set(opus_tools_LIB ${third_party_DIR}/opus_tools/lib/${ANDROID_ABI})
add_library(lib_opus_header STATIC IMPORTED)
set_target_properties(lib_opus_header PROPERTIES IMPORTED_LOCATION
${opus_tools_LIB}/libopus_header.a)

# Build ogg_opus_encoder_tool shared lib.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library(ogg_opus_encoder_tool SHARED ogg_opus_encoder.cc)
target_include_directories(ogg_opus_encoder_tool PRIVATE ${libogg_INCLUDE})
target_link_libraries(ogg_opus_encoder_tool lib_opus lib_ogg lib_opus_header)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

cmake_minimum_required(VERSION 3.22.1)

project("lc3")

include_directories(include)
#add_subdirectory(liblc3)
add_library(${CMAKE_PROJECT_NAME} SHARED
# List C/C++ source files with relative paths to this CMakeLists.txt.
liblc3.cpp

liblc3/attdet.c
liblc3/bits.c
liblc3/bwdet.c
liblc3/energy.c
liblc3/lc3.c
liblc3/ltpf.c
liblc3/mdct.c
liblc3/plc.c
liblc3/sns.c
liblc3/spec.c
liblc3/tables.c
liblc3/tns.c

rnnoise/celt_lpc.c
rnnoise/denoise.c
rnnoise/kiss_fft.c
rnnoise/pitch.c
rnnoise/rnn.c
rnnoise/rnn_data.c
rnnoise/rnn_reader.c

)

target_link_libraries(${CMAKE_PROJECT_NAME}
# List libraries link to the target library
android
log)
Loading

0 comments on commit 75364ac

Please sign in to comment.