Showing preview only (1,634K chars total). Download the full file or copy to clipboard to get everything.
Repository: TeamOpenSmartGlasses/SmartGlassesManager
Branch: master
Commit: ec907f8aa144
Files: 396
Total size: 1.5 MB
Directory structure:
gitextract_hmb1u4o6/
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── SGM_android/
│ ├── .gitignore
│ ├── README.md
│ ├── SmartGlassesManager/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── src/
│ │ │ ├── androidTest/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── teamopensmartglasses/
│ │ │ │ └── smartglassesmanager/
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main/
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── cpp/
│ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ ├── jni/
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── ogg_opus_encoder.cc
│ │ │ │ │ │ └── ogg_opus_encoder.h
│ │ │ │ │ ├── libogg/
│ │ │ │ │ │ ├── Makefile.am
│ │ │ │ │ │ ├── config_types.h
│ │ │ │ │ │ ├── config_types.h.in
│ │ │ │ │ │ ├── ogg.h
│ │ │ │ │ │ └── os_types.h
│ │ │ │ │ ├── libopus/
│ │ │ │ │ │ ├── opus.h
│ │ │ │ │ │ ├── opus_custom.h
│ │ │ │ │ │ ├── opus_defines.h
│ │ │ │ │ │ ├── opus_multistream.h
│ │ │ │ │ │ ├── opus_projection.h
│ │ │ │ │ │ └── opus_types.h
│ │ │ │ │ ├── ogg_opus_encoder.cc
│ │ │ │ │ ├── ogg_opus_encoder.h
│ │ │ │ │ └── opus_tools/
│ │ │ │ │ └── opus_header.h
│ │ │ │ ├── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── teamopensmartglasses/
│ │ │ │ │ └── smartglassesmanager/
│ │ │ │ │ ├── SmartGlassesAndroidService.java
│ │ │ │ │ ├── SmartGlassesRepresentative.java
│ │ │ │ │ ├── comms/
│ │ │ │ │ │ ├── AspWebsocketServer.java
│ │ │ │ │ │ ├── AudioSystem.java
│ │ │ │ │ │ ├── MessageTypes.java
│ │ │ │ │ │ └── VolleyCallback.java
│ │ │ │ │ ├── eventbusmessages/
│ │ │ │ │ │ ├── AudioChunkNewEvent.java
│ │ │ │ │ │ ├── DisableBleScoAudioEvent.java
│ │ │ │ │ │ ├── GoogleAudioChunkNewEvent.java
│ │ │ │ │ │ ├── PauseAsrEvent.java
│ │ │ │ │ │ ├── PostGenericGlobalMessageEvent.java
│ │ │ │ │ │ ├── ScoStartEvent.java
│ │ │ │ │ │ ├── SetFontSizeEvent.java
│ │ │ │ │ │ ├── SmartGlassesConnectedEvent.java
│ │ │ │ │ │ ├── SmartGlassesConnectionEvent.java
│ │ │ │ │ │ ├── TextToSpeechEvent.java
│ │ │ │ │ │ └── VoskAudioChunkNewEvent.java
│ │ │ │ │ ├── hci/
│ │ │ │ │ │ ├── AudioChunkCallback.java
│ │ │ │ │ │ ├── HearItBleMicrophone.java
│ │ │ │ │ │ └── MicrophoneLocalAndBluetooth.java
│ │ │ │ │ ├── smartglassescommunicators/
│ │ │ │ │ │ ├── AndroidSGC.java
│ │ │ │ │ │ ├── AudioWearableSGC.java
│ │ │ │ │ │ ├── SmartGlassesCommunicator.java
│ │ │ │ │ │ ├── SmartGlassesFontSize.java
│ │ │ │ │ │ ├── SmartGlassesModes.java
│ │ │ │ │ │ ├── TextLineSG.java
│ │ │ │ │ │ ├── UltraliteLayoutHelper.java
│ │ │ │ │ │ └── UltraliteSGC.java
│ │ │ │ │ ├── speechrecognition/
│ │ │ │ │ │ ├── ASR_FRAMEWORKS.java
│ │ │ │ │ │ ├── SpeechRecFramework.java
│ │ │ │ │ │ ├── SpeechRecSwitchSystem.java
│ │ │ │ │ │ ├── azure/
│ │ │ │ │ │ │ ├── AzureAudioInputStream.java
│ │ │ │ │ │ │ └── SpeechRecAzure.java
│ │ │ │ │ │ ├── deepgram/
│ │ │ │ │ │ │ └── SpeechRecDeepgram.java
│ │ │ │ │ │ ├── google/
│ │ │ │ │ │ │ ├── SpeechRecGoogle.java
│ │ │ │ │ │ │ ├── asr/
│ │ │ │ │ │ │ │ ├── AlwaysSameSpeakerIDLabeler.java
│ │ │ │ │ │ │ │ ├── AlwaysSpeechPolicy.java
│ │ │ │ │ │ │ │ ├── RepeatingRecognitionSession.java
│ │ │ │ │ │ │ │ ├── RequestForRecognitionThread.java
│ │ │ │ │ │ │ │ ├── SafeTranscriptionResultFormatter.java
│ │ │ │ │ │ │ │ ├── SpeechDetectionPolicy.java
│ │ │ │ │ │ │ │ ├── SpeechSession.java
│ │ │ │ │ │ │ │ ├── SpeechSessionFactory.java
│ │ │ │ │ │ │ │ ├── SpeechSessionListener.java
│ │ │ │ │ │ │ │ ├── TimeUtil.java
│ │ │ │ │ │ │ │ ├── TranscriptionErrorPublisher.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultFormatter.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultReceiver.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultUpdatePublisher.java
│ │ │ │ │ │ │ │ └── asrhelpers/
│ │ │ │ │ │ │ │ ├── CircularByteBuffer.java
│ │ │ │ │ │ │ │ ├── NetworkConnectionChecker.java
│ │ │ │ │ │ │ │ ├── ResponseTextUiAdapter.java
│ │ │ │ │ │ │ │ ├── SampleProcessorInterface.java
│ │ │ │ │ │ │ │ ├── SpeakerIDLabeler.java
│ │ │ │ │ │ │ │ └── StreamingAudioEncoder.java
│ │ │ │ │ │ │ └── gcloudspeech/
│ │ │ │ │ │ │ ├── CloudSpeechSession.java
│ │ │ │ │ │ │ ├── CloudSpeechSessionFactory.java
│ │ │ │ │ │ │ ├── CloudSpeechStreamObserver.java
│ │ │ │ │ │ │ └── TimestampCalculator.java
│ │ │ │ │ │ ├── vad/
│ │ │ │ │ │ │ └── VadGateSpeechPolicy.java
│ │ │ │ │ │ └── vosk/
│ │ │ │ │ │ └── SpeechRecVosk.java
│ │ │ │ │ ├── supportedglasses/
│ │ │ │ │ │ ├── AndroidPhoneTestGlasses.java
│ │ │ │ │ │ ├── AudioWearable.java
│ │ │ │ │ │ ├── EngoTwo.java
│ │ │ │ │ │ ├── EvenRealitiesG1.java
│ │ │ │ │ │ ├── InmoAirOne.java
│ │ │ │ │ │ ├── InmoGo.java
│ │ │ │ │ │ ├── SmartGlassesDevice.java
│ │ │ │ │ │ ├── SmartGlassesOperatingSystem.java
│ │ │ │ │ │ ├── TCLRayNeoXTwo.java
│ │ │ │ │ │ ├── VuzixShield.java
│ │ │ │ │ │ └── VuzixUltralite.java
│ │ │ │ │ ├── texttospeech/
│ │ │ │ │ │ └── TextToSpeechSystem.java
│ │ │ │ │ └── utils/
│ │ │ │ │ ├── AES.java
│ │ │ │ │ ├── BitmapJavaUtils.java
│ │ │ │ │ ├── NetworkUtils.java
│ │ │ │ │ └── PermissionsUtils.java
│ │ │ │ ├── proto/
│ │ │ │ │ └── com/
│ │ │ │ │ └── google/
│ │ │ │ │ └── audio/
│ │ │ │ │ ├── asr/
│ │ │ │ │ │ ├── cloud_speech_session_params.proto
│ │ │ │ │ │ ├── cloud_speech_stream_observer_params.proto
│ │ │ │ │ │ ├── speech_recognition_model_options.proto
│ │ │ │ │ │ ├── transcription_result.proto
│ │ │ │ │ │ └── transcription_result_formatter_options.proto
│ │ │ │ │ ├── codec_and_bitrate.proto
│ │ │ │ │ ├── network_state.proto
│ │ │ │ │ └── speaker_id_info.proto
│ │ │ │ └── res/
│ │ │ │ ├── drawable/
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ ├── outline_device_hub_24.xml
│ │ │ │ │ ├── outline_groups_24.xml
│ │ │ │ │ ├── outline_memory_24.xml
│ │ │ │ │ ├── outline_settings_24.xml
│ │ │ │ │ ├── pretty_thin_border.xml
│ │ │ │ │ ├── rounded_corner.xml
│ │ │ │ │ ├── rounded_corners_bg.xml
│ │ │ │ │ ├── rounded_shadow_bg.xml
│ │ │ │ │ ├── sgm_launcher_background.xml
│ │ │ │ │ ├── textview_background.xml
│ │ │ │ │ ├── wis_launcher_background.xml
│ │ │ │ │ └── wis_launcher_transparent_background.xml
│ │ │ │ ├── drawable-v24/
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── layout/
│ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ ├── all_transcripts_fragment.xml
│ │ │ │ │ ├── api_key_message.xml
│ │ │ │ │ ├── connecting_to_glasses_fragment.xml
│ │ │ │ │ ├── default_app_dialog.xml
│ │ │ │ │ ├── export_data_fragment.xml
│ │ │ │ │ ├── glasses_connected_fragment.xml
│ │ │ │ │ ├── image_item.xml
│ │ │ │ │ ├── main_ui_fragment.xml
│ │ │ │ │ ├── menu_item_exposed_dropdown.xml
│ │ │ │ │ ├── phrase_context_fragment.xml
│ │ │ │ │ ├── phrase_recyclerview_item.xml
│ │ │ │ │ ├── reference_card_recyclerview_item.xml
│ │ │ │ │ ├── response_text_box.xml
│ │ │ │ │ ├── select_glasses_fragment.xml
│ │ │ │ │ ├── settings_fragment.xml
│ │ │ │ │ ├── smart_glasses_debug_fragment.xml
│ │ │ │ │ └── smart_glasses_list_item.xml
│ │ │ │ ├── menu/
│ │ │ │ │ ├── bottom_nav_main_menu.xml
│ │ │ │ │ └── memory_cache_menu.xml
│ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ │ ├── sgm_launcher.xml
│ │ │ │ │ ├── sgm_launcher_round.xml
│ │ │ │ │ ├── wis_launcher.xml
│ │ │ │ │ ├── wis_launcher_round.xml
│ │ │ │ │ ├── wis_launcher_transparent.xml
│ │ │ │ │ └── wis_launcher_transparent_round.xml
│ │ │ │ ├── navigation/
│ │ │ │ │ └── nav_graph.xml
│ │ │ │ ├── values/
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ └── xml/
│ │ │ │ └── file_provider.xml
│ │ │ └── test/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── teamopensmartglasses/
│ │ │ └── smartglassesmanager/
│ │ │ └── ExampleUnitTest.java
│ │ └── third_party/
│ │ ├── CMakeLists.txt
│ │ ├── CMakeLists_libogg.txt
│ │ ├── CMakeLists_libopus.txt
│ │ ├── CMakeLists_opus-tools.txt
│ │ ├── libogg/
│ │ │ └── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libogg.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libogg.a
│ │ │ ├── x86/
│ │ │ │ └── libogg.a
│ │ │ └── x86_64/
│ │ │ └── libogg.a
│ │ ├── libopus/
│ │ │ └── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libopus.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libopus.a
│ │ │ ├── x86/
│ │ │ │ └── libopus.a
│ │ │ └── x86_64/
│ │ │ └── libopus.a
│ │ └── opus_tools/
│ │ ├── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libopus_header.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libopus_header.a
│ │ │ ├── x86/
│ │ │ │ └── libopus_header.a
│ │ │ └── x86_64/
│ │ │ └── libopus_header.a
│ │ └── src/
│ │ ├── .gitignore
│ │ ├── AUTHORS
│ │ ├── CMakeLists.txt
│ │ ├── COPYING
│ │ ├── ChangeLog
│ │ ├── Makefile.am
│ │ ├── Makefile.unix
│ │ ├── NEWS
│ │ ├── README
│ │ ├── autogen.sh
│ │ ├── configure.ac
│ │ ├── man/
│ │ │ ├── opusdec.1
│ │ │ ├── opusenc.1
│ │ │ └── opusinfo.1
│ │ └── src/
│ │ ├── arch.h
│ │ ├── audio-in.c
│ │ ├── diag_range.c
│ │ ├── diag_range.h
│ │ ├── info_opus.c
│ │ ├── info_opus.h
│ │ ├── lpc.c
│ │ ├── lpc.h
│ │ ├── opus_header.c
│ │ ├── opus_header.h
│ │ ├── opusdec.c
│ │ ├── opusenc.c
│ │ ├── opusenc.h
│ │ ├── opusinfo.c
│ │ ├── opusinfo.h
│ │ ├── os_support.h
│ │ ├── resample.c
│ │ ├── speex_resampler.h
│ │ ├── stack_alloc.h
│ │ ├── wav_io.c
│ │ ├── wav_io.h
│ │ ├── wave_out.c
│ │ └── wave_out.h
│ ├── build.gradle
│ ├── build_all.sh
│ ├── build_log.txt
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── SGM_iOS/
│ └── SGM/
│ ├── .gitignore
│ ├── .swiftpm/
│ │ └── xcode/
│ │ └── package.xcworkspace/
│ │ └── xcshareddata/
│ │ └── IDEWorkspaceChecks.plist
│ ├── Package.resolved
│ ├── Package.swift
│ ├── Sources/
│ │ └── SGM/
│ │ └── SGM.swift
│ └── Tests/
│ └── SGMTests/
│ └── SGMTests.swift
├── android_smart_glasses_frontend/
│ ├── README.md
│ └── main/
│ ├── .gitignore
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── libs/
│ │ │ └── hiddencamera-release.aar
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── example/
│ │ │ └── wearableintelligencesystemandroidsmartglasses/
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets/
│ │ │ │ └── autocite_references.csv
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── wearableintelligencesystem/
│ │ │ │ └── androidsmartglasses/
│ │ │ │ ├── ASPClientSocket.java
│ │ │ │ ├── AudioSystem.java
│ │ │ │ ├── ImageAdapter.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── WearableAiService.java
│ │ │ │ ├── archive/
│ │ │ │ │ ├── AudioService.java
│ │ │ │ │ ├── GlboxClientSocket.java
│ │ │ │ │ └── SendImage.java
│ │ │ │ ├── comms/
│ │ │ │ │ ├── AsgWebSocketClient.java
│ │ │ │ │ ├── MessageTypes.java
│ │ │ │ │ ├── WebSocketManager.java
│ │ │ │ │ ├── WifiStatusCallback.java
│ │ │ │ │ └── WifiUtils.java
│ │ │ │ ├── sensors/
│ │ │ │ │ ├── AudioChunkCallback.java
│ │ │ │ │ ├── BluetoothMic.java
│ │ │ │ │ ├── BluetoothScanner.java
│ │ │ │ │ ├── Muse.java
│ │ │ │ │ └── MuseService.java
│ │ │ │ ├── ui/
│ │ │ │ │ ├── ASGFragment.java
│ │ │ │ │ ├── CommandPostUi.java
│ │ │ │ │ ├── CommandResolveUi.java
│ │ │ │ │ ├── ConvoModeUi.java
│ │ │ │ │ ├── HomePromptUi.java
│ │ │ │ │ ├── LanguageTranslateUi.java
│ │ │ │ │ ├── LiveLifeCaptionsUi.java
│ │ │ │ │ ├── ObjectTranslateUi.java
│ │ │ │ │ ├── ReferenceUi.java
│ │ │ │ │ ├── RequiredArgsUi.java
│ │ │ │ │ ├── SelectableImageGridUi.java
│ │ │ │ │ ├── TextWallUi.java
│ │ │ │ │ ├── UiUtils.java
│ │ │ │ │ ├── WakeWordPostUi.java
│ │ │ │ │ └── adapters/
│ │ │ │ │ └── CommandListRecyclerViewAdapter.java
│ │ │ │ └── utils/
│ │ │ │ └── AES.java
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ ├── circle_shape.xml
│ │ │ │ ├── ic_command_failed.xml
│ │ │ │ ├── ic_command_success.xml
│ │ │ │ ├── ic_full_battery.xml
│ │ │ │ ├── ic_full_battery_charging.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── ic_low_battery.xml
│ │ │ │ ├── ic_low_battery_charging.xml
│ │ │ │ ├── ic_mic_listening.xml
│ │ │ │ ├── ic_phone_connected.xml
│ │ │ │ ├── ic_phone_disconnected.xml
│ │ │ │ ├── ic_wifi_off.xml
│ │ │ │ ├── ic_wifi_on.xml
│ │ │ │ ├── selector_image_gridview.xml
│ │ │ │ └── wis_launcher_background.xml
│ │ │ ├── drawable-v24/
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── layout/
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── blank_screen.xml
│ │ │ │ ├── command_list_recyclerview_item.xml
│ │ │ │ ├── command_post_fragment.xml
│ │ │ │ ├── command_resolve_fragment.xml
│ │ │ │ ├── convo_mode_fragment.xml
│ │ │ │ ├── home_prompt_fragment.xml
│ │ │ │ ├── image_gridview.xml
│ │ │ │ ├── live_life_caption_text.xml
│ │ │ │ ├── object_translate_mode_view.xml
│ │ │ │ ├── old_main.xml
│ │ │ │ ├── reference_card.xml
│ │ │ │ ├── required_args_fragment.xml
│ │ │ │ ├── social_intelligence_activity.xml
│ │ │ │ ├── text_block.xml
│ │ │ │ ├── text_list.xml
│ │ │ │ ├── text_wall_card.xml
│ │ │ │ ├── translate_mode_view.xml
│ │ │ │ ├── viewfinder.xml
│ │ │ │ ├── wake_word_post_fragment.xml
│ │ │ │ └── wearable_face_recognizer.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ ├── wis_launcher.xml
│ │ │ │ └── wis_launcher_round.xml
│ │ │ ├── navigation/
│ │ │ │ └── nav_graph.xml
│ │ │ ├── values/
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimensions.xml
│ │ │ │ ├── key.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ └── values-night/
│ │ │ └── themes.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── example/
│ │ └── wearableintelligencesystemandroidsmartglasses/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── example_smart_glasses_app/
├── .gitignore
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── teamopensmartglasses/
│ │ └── example_smart_glasses_app/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── teamopensmartglasses/
│ │ │ └── example_smart_glasses_app/
│ │ │ ├── MainActivity.java
│ │ │ ├── SmartGlassesService.java
│ │ │ └── ui/
│ │ │ ├── ConnectingToSmartGlassesUi.java
│ │ │ ├── GlassesConnectedFragment.java
│ │ │ ├── SelectSmartGlassesUi.java
│ │ │ ├── SettingsUi.java
│ │ │ ├── SmartGlassesListAdapter.java
│ │ │ └── UiUtils.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── outline_device_hub_24.xml
│ │ │ ├── outline_groups_24.xml
│ │ │ ├── outline_memory_24.xml
│ │ │ ├── outline_settings_24.xml
│ │ │ ├── pretty_thin_border.xml
│ │ │ ├── rounded_corner.xml
│ │ │ ├── rounded_corners_bg.xml
│ │ │ ├── rounded_shadow_bg.xml
│ │ │ ├── sgm_launcher_background.xml
│ │ │ ├── textview_background.xml
│ │ │ ├── wis_launcher_background.xml
│ │ │ └── wis_launcher_transparent_background.xml
│ │ ├── drawable-v24/
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── layout/
│ │ │ ├── activity_main.xml
│ │ │ ├── all_transcripts_fragment.xml
│ │ │ ├── api_key_message.xml
│ │ │ ├── connecting_to_glasses_fragment.xml
│ │ │ ├── default_app_dialog.xml
│ │ │ ├── export_data_fragment.xml
│ │ │ ├── glasses_connected_fragment.xml
│ │ │ ├── image_item.xml
│ │ │ ├── main_ui_fragment.xml
│ │ │ ├── menu_item_exposed_dropdown.xml
│ │ │ ├── phrase_context_fragment.xml
│ │ │ ├── phrase_recyclerview_item.xml
│ │ │ ├── reference_card_recyclerview_item.xml
│ │ │ ├── response_text_box.xml
│ │ │ ├── select_glasses_fragment.xml
│ │ │ ├── settings_fragment.xml
│ │ │ ├── smart_glasses_debug_fragment.xml
│ │ │ └── smart_glasses_list_item.xml
│ │ ├── menu/
│ │ │ ├── bottom_nav_main_menu.xml
│ │ │ └── memory_cache_menu.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── navigation/
│ │ │ └── nav_graph.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── xml/
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test/
│ └── java/
│ └── com/
│ └── teamopensmartglasses/
│ └── example_smart_glasses_app/
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
__pycache__
*.pyc
azure_key.txt
# data
*.jpg
*mp3
*mp4
# data/
# models
models/
*.pkl
*.h5
*.scorer
#*.tflite
*.pbmm
*.pth
*.pt
*.tar
#other
# data/
#ANDROID
# Built application files
*.apk
#*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/misc.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
.classpath
.project
.settings
keys/
================================================
FILE: .gitmodules
================================================
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2021 Cayden Pierce
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# SmartGlassesManager
### Update 2024 - **SmartGlassesManager** is now part of [AugmentOS](https://augmentos.org/), a unifying OS for smart glasses such as *Even Reality G1* and *Vuzix Z100*. It combines your favorite smart glasses apps, an app store, and SDK. We hope you like it <3
<p align="center">
<img src="./res/SGM_app_icon_google_play.png" width="25%">
</p>
## Why Use The Smart Glasses Manager?
### Developers
Building apps that run on a smart phone and stream data to smart glasses is hard, but it’s how today’s lightweight smart glasses work. We handle the connection, UI, data streaming, and transcription, allowing you to rapidly develop smart glasses applications that run on any pair of smart glasses.
### Industry
Your smart glasses won’t see massive consumer adoption if third party developers can’t make awesome apps for your hardware. The SmartGlassesManager is a middleware which already supports many apps and makes it easy for developers to build more. That means, if you add support to your hardware for a single application – the SmartGlassesManager – your glasses will instantly support a plethora of consumer-facing applications.
<p align="center">
<img src="./res/SmartGlassesManager_Screenshots_20230405.png" width="80%" margin-left="auto" margin-right="auto">
</p>
## Features
1. Connect smart phone to smart glasses, auto-reconnect
- Wifi, Bluetooth, Android, MCU glasses all supported
2. Receive audio + sensors from glasses
3. Transcribe audio
4. Abstracted interface to show info on the glasses
## Fork of the Wearable Intelligence System
This repo is a fork of the [Wearable Intelligence System](https://github.com/emexlabs/WearableIntelligenceSystem). The Wearable Intelligence System was started at [Emex Labs](https://emexwearables.com) by [Cayden Pierce](https://caydenpierce.com/). This repo has a lot of the history cleaned to make it easier to manage, see the WIS repo for full history.
## Install / Use
You will need two pieces of hardware to run the system:
1. ASP - Android Smart Phone running Android 12+
2. A pair of smart glasses:
- Vuzix Z100 / Ultralite OEM Reference Platform
- Vuzix Shield
- Activelook Engo 1 or Activelook Engo 2
- Inmo Air 1 or Inmo Air 2
- Vuzix Blade 2
- TCL RayNeo X2
### Install
1. On your Android smart phone, flash the ASP app from Android Studio, the releases page, or from Google Play.
- Play Store: Coming soon
- [Github latest release](https://github.com/TeamOpenSmartGlasses/SmartGlassesManager/releases)
2. If using Android Smart Glasses, then on your smart glasses, download or flash the ASG client app:
- [Github latest release](https://github.com/TeamOpenSmartGlasses/SmartGlassesManager/releases)
3.
* Launch the "Smart Glasses Manager" app on your smart phone
* Accept permissions.
* If using Android Smart Glasses -> Tap "Start Wifi Hotspot", turn on (configure password if necessary) your wifi hotspot, then go "Back" to return
- Connect smart glasses WiFi to the smart phone WiFi hotspot
- Enable mobile data (or wifi sharing) on Android smart phone
- Start ASG application on smart glasses
- The phone connection icon will be green if the glasses are connected to your phone. If you speak, you'll see a live transcript on the smart glasses screen.
* If using Bluetooth Smart Glasses -> Turn on Bluetooth on phone.
3. Tap "Connect Smart Glasses" and choose your glasses.
4. Setup complete.
### Normal Use
Here's how to launch the system after you've already done the initial setup above:
1. Launch "Smart Glasses Manager" app on smart phone
2. Enable mobile hotspot on smart phone with the "Start WiFi Hotspot" button
3. Connect Android smart glasses to Android smart phone WiFi hotspot.
4. Launch "WIS" app on smart glasses.
5. Verify system is running by the "Smart Glasses Conection Indicator" icon turning white on the smart glasses HUD.
## Documentation / Developers
(WIP)
Here are the docs: https://github.com/TeamOpenSmartGlasses/SmartGlassesManager/wiki
## Authors
The system is fully open source and built by [TeamOpenSmartGlasses](https://teamopensmartglasses.com). We're a team building open source smart glasses technology to enhance user's intelligence in daily life. Join us: https://discord.gg/5ukNvkEAqT
The TeamOpenSmartGlasses members who are contributing to this project include:
- [Cayden Pierce](https://caydenpierce.com)
- [Alex Israelov](http://www.alexisraelov.com/)
We are building a community that is building cognitive augmentation technologies together.
================================================
FILE: SGM_android/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
================================================
FILE: SGM_android/README.md
================================================
### Special instructions if you need to mess with the OGG streaming CPP JNI.
0. Run Linux (as you should be).
1. Install Java 17.
2. Ensure Java 17 is default Java (can set with `sudo update-java-alternatives`).
3. Run `chmod 777 ./gradle/` and `chmod 777 ./gradle/`.
4. Set your ANDROID_SDK_PATH WITH `export $ANDROID_SDK_PATH=<path to you Android>`.
5. Go into android folder and run `bash build_all.sh` to build everything.
6. If you get gradle version issues, install gradle 8.0.2: https://linuxhint.com/installing_gradle_ubuntu/ (follow the instructions, but replace 7.4.2 with 8.0.2).
7. Subsequent builds, you can just run `./gradlew assembleDebug --stacktrace` to build the APK.
8. Now that CPP/JNI is built, you can use Android Studio to edit app and install APK on phone (located in app/build/outputs/debug/). If you change anything related to CPP/JNI code, you may have to rebuild.
================================================
FILE: SGM_android/SmartGlassesManager/.gitignore
================================================
/build
================================================
FILE: SGM_android/SmartGlassesManager/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.22.1)
project("some-name-needed-here")
add_subdirectory(src/main/cpp)
add_subdirectory(src/main/cpp/jni)
================================================
FILE: SGM_android/SmartGlassesManager/build.gradle
================================================
plugins {
id 'com.android.library'
// id 'kotlin-android'
id 'com.google.protobuf' version '0.9.2'
}
ext {
kotlin_version = '1.6.21'
roomVersion = '2.2.3'
archLifecycleVersion = '2.2.0-rc03'
coreTestingVersion = '2.1.0'
kotlinVersion = '1.6.21'
}
android {
namespace "com.teamopensmartglasses.smartglassesmanager"
compileSdk 33
// aaptOptions {
// noCompress "tflite"
// }
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1,DEPENDENCIES}'
excludes += '/META-INF/INDEX.LIST'
}
}
defaultConfig {
minSdk 30
targetSdk 32
versionCode 3
versionName "0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// ndk {
// abiFilters 'armeabi-v7a', 'arm64-v8a'
// }
}
externalNativeBuild {
cmake {
'-DANDROID_STL=c++_static'
}
}
// buildTypes {
// release {
// minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// }
//// debug {
//// applicationIdSuffix ".debug" //so we can have both release and debug on the same phone
//// }
// }
// compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
// }
//
// sourceSets {
// main {
// assets.srcDirs += "$buildDir/generated/assets"
// java.srcDirs += 'src/main/java'
// proto.srcDirs += 'src/main/proto'
// }
// }
//
// externalNativeBuild {
// cmake {
// path file('CMakeLists.txt')
// version '3.22.1'
// }
// }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.navigation:navigation-fragment:2.2.0'
implementation 'androidx.navigation:navigation-ui:2.2.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
implementation 'com.google.protobuf:protobuf-java:3.21.12'
implementation 'com.google.protobuf:protobuf-java-util:3.21.12'
implementation 'com.google.api.grpc:grpc-google-cloud-speech-v1p1beta1:2.6.0'
implementation "androidx.concurrent:concurrent-futures:1.0.0-alpha03"
implementation "androidx.lifecycle:lifecycle-common:2.2.0"
implementation 'androidx.preference:preference:1.2.0'
implementation 'joda-time:joda-time:2.12.2'
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
implementation "androidx.core:core:1.1.0-rc03"
"androidx.legacy:legacy-support-v4:1.0.0"
implementation 'io.grpc:grpc-okhttp:1.53.0'
implementation "androidx.recyclerview:recyclerview:1.1.0-beta02"
implementation "com.github.bumptech.glide:glide:4.11.0"
implementation "com.google.android.material:material:1.6.0-alpha01"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "com.google.flogger:flogger-system-backend:0.3.1"
implementation "com.google.flogger:flogger:0.3.1"
implementation "com.google.guava:listenablefuture:1.0"
implementation "junit:junit:4.12"
implementation "org.hamcrest:hamcrest-library:1.3"
implementation 'com.squareup.picasso:picasso:2.8'
implementation "org.java-websocket:Java-WebSocket:1.5.2"
implementation "io.reactivex.rxjava3:rxandroid:3.0.0"
implementation "io.reactivex.rxjava3:rxjava:3.0.0"
implementation "com.google.android.gms:play-services-tasks:18.0.0"
implementation "com.google.android.gms:play-services-location:18.0.0"
implementation "com.google.code.gson:gson:2.8.6"
//ROOM
// Room components
implementation "androidx.room:room-runtime:$roomVersion"
annotationProcessor "androidx.room:room-compiler:$roomVersion"
androidTestImplementation "androidx.room:room-testing:$roomVersion"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:$archLifecycleVersion"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:$archLifecycleVersion"
implementation "com.google.guava:guava:28.1-android"
//VOSK ASR
implementation 'net.java.dev.jna:jna:5.8.0@aar'
implementation "com.alphacephei:vosk-android:0.3.34@aar"
//java.util.time backport
implementation "org.threeten:threetenbp:1.5.2"
//http(s) lib
implementation "com.android.volley:volley:1.2.1"
//EventBus, greenrobot
implementation("org.greenrobot:eventbus:3.3.1")
//activelook SDK
//implementation 'com.github.activelook:android-sdk:v4.4.0'
//Json (de/)serialization
implementation 'com.google.code.gson:gson:2.10.1'
//for VAD (using Silero DNN)
implementation 'com.github.gkonovalov:android-vad:2.0.1'
implementation 'com.microsoft.onnxruntime:onnxruntime-android:1.15.0'
//Vuzix Ultralite OEM Platform / Vuzix Z100
implementation 'com.vuzix:ultralite-sdk-android:1.4.1'
//Azure ASR
implementation "com.microsoft.cognitiveservices.speech:client-sdk:1.38.0"
implementation project(path: ':AugmentOSLib')
}
//VOSK ASR prep models - need one for each language
tasks.register('genUUID_en') {
def uuid = UUID.randomUUID().toString()
def odir = file("$buildDir/generated/assets/model-en-us")
def ofile = file("$odir/uuid")
doLast {
mkdir odir
ofile.text = uuid
}
}
tasks.register('genUUID_fr') {
def uuid = UUID.randomUUID().toString()
def odir = file("$buildDir/generated/assets/model-fr-small")
def ofile = file("$odir/uuid")
doLast {
mkdir odir
ofile.text = uuid
}
}
preBuild.dependsOn(genUUID_en)
preBuild.dependsOn(genUUID_fr)
protobuf {
protoc {
// use this compiler, from the maven repo (instead of a local file, for instance)
artifact = 'com.google.protobuf:protoc:3.21.12'
}
generateProtoTasks {
all().configureEach { task ->
// remove the default java output
task.builtins {
remove java
}
// add the java output with lite runtime
task.builtins {
java {
option 'lite'
}
}
}
}
}
================================================
FILE: SGM_android/SmartGlassesManager/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#don't leave logs in release build:
-dontskipnonpubliclibraryclasses
-dontobfuscate
-forceprocessing
-optimizationpasses 5
-keep class * extends android.app.Activity
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
}
================================================
FILE: SGM_android/SmartGlassesManager/src/androidTest/java/com/teamopensmartglasses/smartglassesmanager/ExampleInstrumentedTest.java
================================================
package com.teamopensmartglasses.smartglassesmanager;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.wearableintelligencesystem.androidsmartphone", appContext.getPackageName());
}
}
================================================
FILE: SGM_android/SmartGlassesManager/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.teamopensmartglasses.smartglassesmanager">
<uses-sdk android:minSdkVersion="34"
android:targetSdkVersion="34"
/>
<!-- NETWORK-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- SERVICE-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- LOCATION-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- BLUETOOTH-->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation"/>
<!-- AUDIO-->
<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>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
</manifest>
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/CMakeLists.txt
================================================
# 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)
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/jni/CMakeLists.txt
================================================
#build for ogg_opus_encoder shared library
cmake_minimum_required(VERSION 3.22.1)
add_library(ogg_opus_encoder SHARED ogg_opus_encoder.cc ../ogg_opus_encoder.cc)
# Include libraries needed for ogg_opus_encoder
target_link_libraries(ogg_opus_encoder ogg_opus_encoder_tool)
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/jni/ogg_opus_encoder.cc
================================================
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ogg_opus_encoder.h"
#include <jni.h>
#include <cassert>
#include <cstdint>
#include "../ogg_opus_encoder.h"
namespace {
using audio_util::OggOpusEncoder;
OggOpusEncoder* GetInstanceOrDie(jlong ptr) {
assert(ptr);
return reinterpret_cast<OggOpusEncoder*>(ptr);
}
bool VerifyInitialized(const std::string& function_name, jlong instance_ptr) {
if (instance_ptr == 0) {
fprintf(stderr, "%s called prior to allocate() or after destroy()!\n",
function_name.c_str());
return false;
}
OggOpusEncoder* instance = GetInstanceOrDie(instance_ptr);
if (instance == nullptr) {
fprintf(stderr, "%s called prior to init()!\n", function_name.c_str());
return false;
}
return true;
}
JNIEXPORT jbyteArray convertToByteArray(const std::vector<unsigned char>& data,
JNIEnv* env) {
jbyteArray byteArray = env->NewByteArray(data.size());
env->SetByteArrayRegion(byteArray, 0, data.size(),
reinterpret_cast<const jbyte*>(data.data()));
return byteArray;
}
} // namespace
JNIEXPORT jlong JNICALL JNI_METHOD(init)(JNIEnv* env, jobject instance,
jint num_channels,
jint bitrate_bits_per_second,
jint sample_rate_hz,
jboolean use_vbr) {
constexpr bool low_latency_mode = true;
return reinterpret_cast<jlong>(new OggOpusEncoder(
num_channels, sample_rate_hz, bitrate_bits_per_second, use_vbr,
low_latency_mode));
}
JNIEXPORT jbyteArray JNICALL
JNI_METHOD(processAudioBytes)(JNIEnv* env, jobject instance, jlong instance_ptr,
jbyteArray samples, jint offset, jint length) {
if (!VerifyInitialized("processAudioBytes", instance_ptr)) {
return convertToByteArray(std::vector<unsigned char>(0), env);
}
jsize array_length_bytes = length;
if (!array_length_bytes) {
fprintf(stdout, "Found empty array\n");
}
assert(array_length_bytes % 2 == 0 && "int16 formatted stream missing bytes!");
std::vector<int16_t> pcm(array_length_bytes / 2);
env->GetByteArrayRegion(samples, offset, array_length_bytes,
reinterpret_cast<jbyte*>(pcm.data()));
if (env->ExceptionOccurred()) {
fprintf(stderr, "Exception occurred in java Environment object\n");
}
return convertToByteArray(GetInstanceOrDie(instance_ptr)->Process(pcm), env);
}
JNIEXPORT jbyteArray JNICALL JNI_METHOD(flush)(JNIEnv* env, jobject instance,
jlong instance_ptr) {
return convertToByteArray(GetInstanceOrDie(instance_ptr)->Flush(), env);
}
JNIEXPORT void JNICALL JNI_METHOD(free)(JNIEnv* env, jobject instance,
jlong instance_ptr) {
delete reinterpret_cast<OggOpusEncoder*>(instance_ptr);
}
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/jni/ogg_opus_encoder.h
================================================
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef AUDIO_UTIL_JNI_OGG_OPUS_ENCODER_H_
#define AUDIO_UTIL_JNI_OGG_OPUS_ENCODER_H_
#include <jni.h>
// https://stackoverflow.com/questions/25363027/jni-getmethodid-not-working-for-constructor-of-inner-class
#define JNI_METHOD(fn) \
Java_com_teamopensmartglasses_smartglassesmanager_speechrecognition_google_asr_asrhelpers_StreamingAudioEncoder_00024OggOpusEncoder_##fn // NOLINT
extern "C" {
// Create opus encoder instance. The pointer is returned in a
// jlong. Remember to call destroy with the returned value when you're done.
JNIEXPORT jlong JNICALL JNI_METHOD(init)(JNIEnv* env,
jobject instance,
jint num_channels,
jint bitrate_bits_per_second,
jint sample_rate_hz,
jboolean use_vbr);
// samples must be an even number of bytes, as it represents 16-bit audio data.
JNIEXPORT jbyteArray JNICALL JNI_METHOD(processAudioBytes)(JNIEnv* env,
jobject instance,
jlong instance_ptr,
jbyteArray samples,
jint offset,
jint length);
// Tell the encoder that there will be no more samples.
JNIEXPORT jbyteArray JNICALL JNI_METHOD(flush)(JNIEnv* env, jobject instance,
jlong instance_ptr);
// Releases all resources.
JNIEXPORT void JNICALL JNI_METHOD(free)(JNIEnv* env, jobject instance,
jlong instance_ptr);
} // extern "C"
#endif // AUDIO_UTIL_JNI_OGG_OPUS_ENCODER_H_
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/Makefile.am
================================================
## Process this file with automake to produce Makefile.in
oggincludedir = $(includedir)/ogg
ogginclude_HEADERS = ogg.h os_types.h
nodist_ogginclude_HEADERS = config_types.h
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/config_types.h
================================================
#ifndef __CONFIG_TYPES_H__
#define __CONFIG_TYPES_H__
/* these are filled in by configure or cmake*/
#define INCLUDE_INTTYPES_H 1
#define INCLUDE_STDINT_H 1
#define INCLUDE_SYS_TYPES_H 1
#if INCLUDE_INTTYPES_H
# include <inttypes.h>
#endif
#if INCLUDE_STDINT_H
# include <stdint.h>
#endif
#if INCLUDE_SYS_TYPES_H
# include <sys/types.h>
#endif
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
#endif
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/config_types.h.in
================================================
#ifndef __CONFIG_TYPES_H__
#define __CONFIG_TYPES_H__
/* these are filled in by configure or cmake*/
#define INCLUDE_INTTYPES_H @INCLUDE_INTTYPES_H@
#define INCLUDE_STDINT_H @INCLUDE_STDINT_H@
#define INCLUDE_SYS_TYPES_H @INCLUDE_SYS_TYPES_H@
#if INCLUDE_INTTYPES_H
# include <inttypes.h>
#endif
#if INCLUDE_STDINT_H
# include <stdint.h>
#endif
#if INCLUDE_SYS_TYPES_H
# include <sys/types.h>
#endif
typedef @SIZE16@ ogg_int16_t;
typedef @USIZE16@ ogg_uint16_t;
typedef @SIZE32@ ogg_int32_t;
typedef @USIZE32@ ogg_uint32_t;
typedef @SIZE64@ ogg_int64_t;
typedef @USIZE64@ ogg_uint64_t;
#endif
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/ogg.h
================================================
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: toplevel libogg include
********************************************************************/
#ifndef _OGG_H
#define _OGG_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include "os_types.h"
typedef struct {
void *iov_base;
size_t iov_len;
} ogg_iovec_t;
typedef struct {
long endbyte;
int endbit;
unsigned char *buffer;
unsigned char *ptr;
long storage;
} oggpack_buffer;
/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/
typedef struct {
unsigned char *header;
long header_len;
unsigned char *body;
long body_len;
} ogg_page;
/* ogg_stream_state contains the current encode/decode state of a logical
Ogg bitstream **********************************************************/
typedef struct {
unsigned char *body_data; /* bytes from packet bodies */
long body_storage; /* storage elements allocated */
long body_fill; /* elements stored; fill mark */
long body_returned; /* elements of fill returned */
int *lacing_vals; /* The values that will go to the segment table */
ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
this way, but it is simple coupled to the
lacing fifo */
long lacing_storage;
long lacing_fill;
long lacing_packet;
long lacing_returned;
unsigned char header[282]; /* working space for header encode */
int header_fill;
int e_o_s; /* set when we have buffered the last packet in the
logical bitstream */
int b_o_s; /* set after we've written the initial page
of a logical bitstream */
long serialno;
long pageno;
ogg_int64_t packetno; /* sequence number for decode; the framing
knows where there's a hole in the data,
but we need coupling so that the codec
(which is in a separate abstraction
layer) also knows about the gap */
ogg_int64_t granulepos;
} ogg_stream_state;
/* ogg_packet is used to encapsulate the data and metadata belonging
to a single raw Ogg/Vorbis packet *************************************/
typedef struct {
unsigned char *packet;
long bytes;
long b_o_s;
long e_o_s;
ogg_int64_t granulepos;
ogg_int64_t packetno; /* sequence number for decode; the framing
knows where there's a hole in the data,
but we need coupling so that the codec
(which is in a separate abstraction
layer) also knows about the gap */
} ogg_packet;
typedef struct {
unsigned char *data;
int storage;
int fill;
int returned;
int unsynced;
int headerbytes;
int bodybytes;
} ogg_sync_state;
/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/
extern void oggpack_writeinit(oggpack_buffer *b);
extern int oggpack_writecheck(oggpack_buffer *b);
extern void oggpack_writetrunc(oggpack_buffer *b,long bits);
extern void oggpack_writealign(oggpack_buffer *b);
extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits);
extern void oggpack_reset(oggpack_buffer *b);
extern void oggpack_writeclear(oggpack_buffer *b);
extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
extern long oggpack_look(oggpack_buffer *b,int bits);
extern long oggpack_look1(oggpack_buffer *b);
extern void oggpack_adv(oggpack_buffer *b,int bits);
extern void oggpack_adv1(oggpack_buffer *b);
extern long oggpack_read(oggpack_buffer *b,int bits);
extern long oggpack_read1(oggpack_buffer *b);
extern long oggpack_bytes(oggpack_buffer *b);
extern long oggpack_bits(oggpack_buffer *b);
extern unsigned char *oggpack_get_buffer(oggpack_buffer *b);
extern void oggpackB_writeinit(oggpack_buffer *b);
extern int oggpackB_writecheck(oggpack_buffer *b);
extern void oggpackB_writetrunc(oggpack_buffer *b,long bits);
extern void oggpackB_writealign(oggpack_buffer *b);
extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits);
extern void oggpackB_reset(oggpack_buffer *b);
extern void oggpackB_writeclear(oggpack_buffer *b);
extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits);
extern long oggpackB_look(oggpack_buffer *b,int bits);
extern long oggpackB_look1(oggpack_buffer *b);
extern void oggpackB_adv(oggpack_buffer *b,int bits);
extern void oggpackB_adv1(oggpack_buffer *b);
extern long oggpackB_read(oggpack_buffer *b,int bits);
extern long oggpackB_read1(oggpack_buffer *b);
extern long oggpackB_bytes(oggpack_buffer *b);
extern long oggpackB_bits(oggpack_buffer *b);
extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b);
/* Ogg BITSTREAM PRIMITIVES: encoding **************************/
extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
extern int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov,
int count, long e_o_s, ogg_int64_t granulepos);
extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
extern int ogg_stream_pageout_fill(ogg_stream_state *os, ogg_page *og, int nfill);
extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og);
extern int ogg_stream_flush_fill(ogg_stream_state *os, ogg_page *og, int nfill);
/* Ogg BITSTREAM PRIMITIVES: decoding **************************/
extern int ogg_sync_init(ogg_sync_state *oy);
extern int ogg_sync_clear(ogg_sync_state *oy);
extern int ogg_sync_reset(ogg_sync_state *oy);
extern int ogg_sync_destroy(ogg_sync_state *oy);
extern int ogg_sync_check(ogg_sync_state *oy);
extern char *ogg_sync_buffer(ogg_sync_state *oy, long size);
extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes);
extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
/* Ogg BITSTREAM PRIMITIVES: general ***************************/
extern int ogg_stream_init(ogg_stream_state *os,int serialno);
extern int ogg_stream_clear(ogg_stream_state *os);
extern int ogg_stream_reset(ogg_stream_state *os);
extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno);
extern int ogg_stream_destroy(ogg_stream_state *os);
extern int ogg_stream_check(ogg_stream_state *os);
extern int ogg_stream_eos(ogg_stream_state *os);
extern void ogg_page_checksum_set(ogg_page *og);
extern int ogg_page_version(const ogg_page *og);
extern int ogg_page_continued(const ogg_page *og);
extern int ogg_page_bos(const ogg_page *og);
extern int ogg_page_eos(const ogg_page *og);
extern ogg_int64_t ogg_page_granulepos(const ogg_page *og);
extern int ogg_page_serialno(const ogg_page *og);
extern long ogg_page_pageno(const ogg_page *og);
extern int ogg_page_packets(const ogg_page *og);
extern void ogg_packet_clear(ogg_packet *op);
#ifdef __cplusplus
}
#endif
#endif /* _OGG_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/os_types.h
================================================
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
function: Define a consistent set of types on each platform.
********************************************************************/
#ifndef _OS_TYPES_H
#define _OS_TYPES_H
/* make it easy on the folks that want to compile the libs with a
different malloc than stdlib */
#define _ogg_malloc malloc
#define _ogg_calloc calloc
#define _ogg_realloc realloc
#define _ogg_free free
#if defined(_WIN32)
# if defined(__CYGWIN__)
# include <stdint.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
# elif defined(__MINGW32__)
# include <sys/types.h>
typedef short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long ogg_int64_t;
typedef unsigned long long ogg_uint64_t;
# elif defined(__MWERKS__)
typedef long long ogg_int64_t;
typedef unsigned long long ogg_uint64_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
# else
# if defined(_MSC_VER) && (_MSC_VER >= 1800) /* MSVC 2013 and newer */
# include <stdint.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
# else
/* MSVC/Borland */
typedef __int64 ogg_int64_t;
typedef __int32 ogg_int32_t;
typedef unsigned __int32 ogg_uint32_t;
typedef unsigned __int64 ogg_uint64_t;
typedef __int16 ogg_int16_t;
typedef unsigned __int16 ogg_uint16_t;
# endif
# endif
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
# include <inttypes.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
#elif defined(__HAIKU__)
/* Haiku */
# include <sys/types.h>
typedef short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long ogg_int64_t;
typedef unsigned long long ogg_uint64_t;
#elif defined(__BEOS__)
/* Be */
# include <inttypes.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;
typedef uint64_t ogg_uint64_t;
#elif defined (__EMX__)
/* OS/2 GCC */
typedef short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long ogg_int64_t;
typedef unsigned long long ogg_uint64_t;
#elif defined (DJGPP)
/* DJGPP */
typedef short ogg_int16_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long ogg_int64_t;
typedef unsigned long long ogg_uint64_t;
#elif defined(R5900)
/* PS2 EE */
typedef long ogg_int64_t;
typedef unsigned long ogg_uint64_t;
typedef int ogg_int32_t;
typedef unsigned ogg_uint32_t;
typedef short ogg_int16_t;
#elif defined(__SYMBIAN32__)
/* Symbian GCC */
typedef signed short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef signed int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long int ogg_int64_t;
typedef unsigned long long int ogg_uint64_t;
#elif defined(__TMS320C6X__)
/* TI C64x compiler */
typedef signed short ogg_int16_t;
typedef unsigned short ogg_uint16_t;
typedef signed int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long int ogg_int64_t;
typedef unsigned long long int ogg_uint64_t;
#else
# include "config_types.h"
#endif
#endif /* _OS_TYPES_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus.h
================================================
/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
Written by Jean-Marc Valin and Koen Vos */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file opus.h
* @brief Opus reference implementation API
*/
#ifndef OPUS_H
#define OPUS_H
#include "opus_types.h"
#include "opus_defines.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @mainpage Opus
*
* The Opus codec is designed for interactive speech and audio transmission over the Internet.
* It is designed by the IETF Codec Working Group and incorporates technology from
* Skype's SILK codec and Xiph.Org's CELT codec.
*
* The Opus codec is designed to handle a wide range of interactive audio applications,
* including Voice over IP, videoconferencing, in-game chat, and even remote live music
* performances. It can scale from low bit-rate narrowband speech to very high quality
* stereo music. Its main features are:
* @li Sampling rates from 8 to 48 kHz
* @li Bit-rates from 6 kb/s to 510 kb/s
* @li Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
* @li Audio bandwidth from narrowband to full-band
* @li Support for speech and music
* @li Support for mono and stereo
* @li Support for multichannel (up to 255 channels)
* @li Frame sizes from 2.5 ms to 60 ms
* @li Good loss robustness and packet loss concealment (PLC)
* @li Floating point and fixed-point implementation
*
* Documentation sections:
* @li @ref opus_encoder
* @li @ref opus_decoder
* @li @ref opus_repacketizer
* @li @ref opus_multistream
* @li @ref opus_libinfo
* @li @ref opus_custom
*/
/** @defgroup opus_encoder Opus Encoder
* @{
*
* @brief This page describes the process and functions used to encode Opus.
*
* Since Opus is a stateful codec, the encoding process starts with creating an encoder
* state. This can be done with:
*
* @code
* int error;
* OpusEncoder *enc;
* enc = opus_encoder_create(Fs, channels, application, &error);
* @endcode
*
* From this point, @c enc can be used for encoding an audio stream. An encoder state
* @b must @b not be used for more than one stream at the same time. Similarly, the encoder
* state @b must @b not be re-initialized for each frame.
*
* While opus_encoder_create() allocates memory for the state, it's also possible
* to initialize pre-allocated memory:
*
* @code
* int size;
* int error;
* OpusEncoder *enc;
* size = opus_encoder_get_size(channels);
* enc = malloc(size);
* error = opus_encoder_init(enc, Fs, channels, application);
* @endcode
*
* where opus_encoder_get_size() returns the required size for the encoder state. Note that
* future versions of this code may change the size, so no assuptions should be made about it.
*
* The encoder state is always continuous in memory and only a shallow copy is sufficient
* to copy it (e.g. memcpy())
*
* It is possible to change some of the encoder's settings using the opus_encoder_ctl()
* interface. All these settings already default to the recommended value, so they should
* only be changed when necessary. The most common settings one may want to change are:
*
* @code
* opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate));
* opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity));
* opus_encoder_ctl(enc, OPUS_SET_SIGNAL(signal_type));
* @endcode
*
* where
*
* @arg bitrate is in bits per second (b/s)
* @arg complexity is a value from 1 to 10, where 1 is the lowest complexity and 10 is the highest
* @arg signal_type is either OPUS_AUTO (default), OPUS_SIGNAL_VOICE, or OPUS_SIGNAL_MUSIC
*
* See @ref opus_encoderctls and @ref opus_genericctls for a complete list of parameters that can be set or queried. Most parameters can be set or changed at any time during a stream.
*
* To encode a frame, opus_encode() or opus_encode_float() must be called with exactly one frame (2.5, 5, 10, 20, 40 or 60 ms) of audio data:
* @code
* len = opus_encode(enc, audio_frame, frame_size, packet, max_packet);
* @endcode
*
* where
* <ul>
* <li>audio_frame is the audio data in opus_int16 (or float for opus_encode_float())</li>
* <li>frame_size is the duration of the frame in samples (per channel)</li>
* <li>packet is the byte array to which the compressed data is written</li>
* <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended).
* Do not use max_packet to control VBR target bitrate, instead use the #OPUS_SET_BITRATE CTL.</li>
* </ul>
*
* opus_encode() and opus_encode_float() return the number of bytes actually written to the packet.
* The return value <b>can be negative</b>, which indicates that an error has occurred. If the return value
* is 2 bytes or less, then the packet does not need to be transmitted (DTX).
*
* Once the encoder state if no longer needed, it can be destroyed with
*
* @code
* opus_encoder_destroy(enc);
* @endcode
*
* If the encoder was created with opus_encoder_init() rather than opus_encoder_create(),
* then no action is required aside from potentially freeing the memory that was manually
* allocated for it (calling free(enc) for the example above)
*
*/
/** Opus encoder state.
* This contains the complete state of an Opus encoder.
* It is position independent and can be freely copied.
* @see opus_encoder_create,opus_encoder_init
*/
typedef struct OpusEncoder OpusEncoder;
/** Gets the size of an <code>OpusEncoder</code> structure.
* @param[in] channels <tt>int</tt>: Number of channels.
* This must be 1 or 2.
* @returns The size in bytes.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels);
/**
*/
/** Allocates and initializes an encoder state.
* There are three coding modes:
*
* @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice
* signals. It enhances the input signal by high-pass filtering and
* emphasizing formants and harmonics. Optionally it includes in-band
* forward error correction to protect against packet loss. Use this
* mode for typical VoIP applications. Because of the enhancement,
* even at high bitrates the output may sound different from the input.
*
* @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most
* non-voice signals like music. Use this mode for music and mixed
* (music/voice) content, broadcast, and applications requiring less
* than 15 ms of coding delay.
*
* @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that
* disables the speech-optimized mode in exchange for slightly reduced delay.
* This mode can only be set on an newly initialized or freshly reset encoder
* because it changes the codec delay.
*
* This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution).
* @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal
* @param [in] application <tt>int</tt>: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)
* @param [out] error <tt>int*</tt>: @ref opus_errorcodes
* @note Regardless of the sampling rate and number channels selected, the Opus encoder
* can switch to a lower audio bandwidth or number of channels if the bitrate
* selected is too low. This also means that it is safe to always use 48 kHz stereo input
* and let the encoder optimize the encoding.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create(
opus_int32 Fs,
int channels,
int application,
int *error
);
/** Initializes a previously allocated encoder state
* The memory pointed to by st must be at least the size returned by opus_encoder_get_size().
* This is intended for applications which use their own allocator instead of malloc.
* @see opus_encoder_create(),opus_encoder_get_size()
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @param [in] st <tt>OpusEncoder*</tt>: Encoder state
* @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal
* @param [in] application <tt>int</tt>: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)
* @retval #OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_encoder_init(
OpusEncoder *st,
opus_int32 Fs,
int channels,
int application
) OPUS_ARG_NONNULL(1);
/** Encodes an Opus frame.
* @param [in] st <tt>OpusEncoder*</tt>: Encoder state
* @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)
* @param [in] frame_size <tt>int</tt>: Number of samples per channel in the
* input signal.
* This must be an Opus frame size for
* the encoder's sampling rate.
* For example, at 48 kHz the permitted
* values are 120, 240, 480, 960, 1920,
* and 2880.
* Passing in a duration of less than
* 10 ms (480 samples at 48 kHz) will
* prevent the encoder from using the LPC
* or hybrid modes.
* @param [out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode(
OpusEncoder *st,
const opus_int16 *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Encodes an Opus frame from floating point input.
* @param [in] st <tt>OpusEncoder*</tt>: Encoder state
* @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.
* Samples with a range beyond +/-1.0 are supported but will
* be clipped by decoders using the integer API and should
* only be used if it is known that the far end supports
* extended dynamic range.
* length is frame_size*channels*sizeof(float)
* @param [in] frame_size <tt>int</tt>: Number of samples per channel in the
* input signal.
* This must be an Opus frame size for
* the encoder's sampling rate.
* For example, at 48 kHz the permitted
* values are 120, 240, 480, 960, 1920,
* and 2880.
* Passing in a duration of less than
* 10 ms (480 samples at 48 kHz) will
* prevent the encoder from using the LPC
* or hybrid modes.
* @param [out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode_float(
OpusEncoder *st,
const float *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Frees an <code>OpusEncoder</code> allocated by opus_encoder_create().
* @param[in] st <tt>OpusEncoder*</tt>: State to be freed.
*/
OPUS_EXPORT void opus_encoder_destroy(OpusEncoder *st);
/** Perform a CTL function on an Opus encoder.
*
* Generally the request and subsequent arguments are generated
* by a convenience macro.
* @param st <tt>OpusEncoder*</tt>: Encoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls or
* @ref opus_encoderctls.
* @see opus_genericctls
* @see opus_encoderctls
*/
OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/**@}*/
/** @defgroup opus_decoder Opus Decoder
* @{
*
* @brief This page describes the process and functions used to decode Opus.
*
* The decoding process also starts with creating a decoder
* state. This can be done with:
* @code
* int error;
* OpusDecoder *dec;
* dec = opus_decoder_create(Fs, channels, &error);
* @endcode
* where
* @li Fs is the sampling rate and must be 8000, 12000, 16000, 24000, or 48000
* @li channels is the number of channels (1 or 2)
* @li error will hold the error code in case of failure (or #OPUS_OK on success)
* @li the return value is a newly created decoder state to be used for decoding
*
* While opus_decoder_create() allocates memory for the state, it's also possible
* to initialize pre-allocated memory:
* @code
* int size;
* int error;
* OpusDecoder *dec;
* size = opus_decoder_get_size(channels);
* dec = malloc(size);
* error = opus_decoder_init(dec, Fs, channels);
* @endcode
* where opus_decoder_get_size() returns the required size for the decoder state. Note that
* future versions of this code may change the size, so no assuptions should be made about it.
*
* The decoder state is always continuous in memory and only a shallow copy is sufficient
* to copy it (e.g. memcpy())
*
* To decode a frame, opus_decode() or opus_decode_float() must be called with a packet of compressed audio data:
* @code
* frame_size = opus_decode(dec, packet, len, decoded, max_size, 0);
* @endcode
* where
*
* @li packet is the byte array containing the compressed data
* @li len is the exact number of bytes contained in the packet
* @li decoded is the decoded audio data in opus_int16 (or float for opus_decode_float())
* @li max_size is the max duration of the frame in samples (per channel) that can fit into the decoded_frame array
*
* opus_decode() and opus_decode_float() return the number of samples (per channel) decoded from the packet.
* If that value is negative, then an error has occurred. This can occur if the packet is corrupted or if the audio
* buffer is too small to hold the decoded audio.
*
* Opus is a stateful codec with overlapping blocks and as a result Opus
* packets are not coded independently of each other. Packets must be
* passed into the decoder serially and in the correct order for a correct
* decode. Lost packets can be replaced with loss concealment by calling
* the decoder with a null pointer and zero length for the missing packet.
*
* A single codec state may only be accessed from a single thread at
* a time and any required locking must be performed by the caller. Separate
* streams must be decoded with separate decoder states and can be decoded
* in parallel unless the library was compiled with NONTHREADSAFE_PSEUDOSTACK
* defined.
*
*/
/** Opus decoder state.
* This contains the complete state of an Opus decoder.
* It is position independent and can be freely copied.
* @see opus_decoder_create,opus_decoder_init
*/
typedef struct OpusDecoder OpusDecoder;
/** Gets the size of an <code>OpusDecoder</code> structure.
* @param [in] channels <tt>int</tt>: Number of channels.
* This must be 1 or 2.
* @returns The size in bytes.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_size(int channels);
/** Allocates and initializes a decoder state.
* @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode
* @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes
*
* Internally Opus stores data at 48000 Hz, so that should be the default
* value for Fs. However, the decoder can efficiently decode to buffers
* at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use
* data at the full sample rate, or knows the compressed data doesn't
* use the full frequency range, it can request decoding at a reduced
* rate. Likewise, the decoder is capable of filling in either mono or
* interleaved stereo pcm buffers, at the caller's request.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusDecoder *opus_decoder_create(
opus_int32 Fs,
int channels,
int *error
);
/** Initializes a previously allocated decoder state.
* The state must be at least the size returned by opus_decoder_get_size().
* This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @param [in] st <tt>OpusDecoder*</tt>: Decoder state.
* @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode
* @retval #OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_EXPORT int opus_decoder_init(
OpusDecoder *st,
opus_int32 Fs,
int channels
) OPUS_ARG_NONNULL(1);
/** Decode an Opus packet.
* @param [in] st <tt>OpusDecoder*</tt>: Decoder state
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
* @param [in] len <tt>opus_int32</tt>: Number of bytes in payload*
* @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(opus_int16)
* @param [in] frame_size Number of samples per channel of available space in \a pcm.
* If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will
* not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),
* then frame_size needs to be exactly the duration of audio that is missing, otherwise the
* decoder will not be in the optimal state to decode the next incoming packet. For the PLC and
* FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.
* @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be
* decoded. If no such data is available, the frame is decoded as if it were lost.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode(
OpusDecoder *st,
const unsigned char *data,
opus_int32 len,
opus_int16 *pcm,
int frame_size,
int decode_fec
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Decode an Opus packet with floating point output.
* @param [in] st <tt>OpusDecoder*</tt>: Decoder state
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
* @param [in] len <tt>opus_int32</tt>: Number of bytes in payload
* @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(float)
* @param [in] frame_size Number of samples per channel of available space in \a pcm.
* If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will
* not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),
* then frame_size needs to be exactly the duration of audio that is missing, otherwise the
* decoder will not be in the optimal state to decode the next incoming packet. For the PLC and
* FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.
* @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be
* decoded. If no such data is available the frame is decoded as if it were lost.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode_float(
OpusDecoder *st,
const unsigned char *data,
opus_int32 len,
float *pcm,
int frame_size,
int decode_fec
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Perform a CTL function on an Opus decoder.
*
* Generally the request and subsequent arguments are generated
* by a convenience macro.
* @param st <tt>OpusDecoder*</tt>: Decoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls or
* @ref opus_decoderctls.
* @see opus_genericctls
* @see opus_decoderctls
*/
OPUS_EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/** Frees an <code>OpusDecoder</code> allocated by opus_decoder_create().
* @param[in] st <tt>OpusDecoder*</tt>: State to be freed.
*/
OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st);
/** Parse an opus packet into one or more frames.
* Opus_decode will perform this operation internally so most applications do
* not need to use this function.
* This function does not copy the frames, the returned pointers are pointers into
* the input packet.
* @param [in] data <tt>char*</tt>: Opus packet to be parsed
* @param [in] len <tt>opus_int32</tt>: size of data
* @param [out] out_toc <tt>char*</tt>: TOC pointer
* @param [out] frames <tt>char*[48]</tt> encapsulated frames
* @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames
* @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)
* @returns number of frames
*/
OPUS_EXPORT int opus_packet_parse(
const unsigned char *data,
opus_int32 len,
unsigned char *out_toc,
const unsigned char *frames[48],
opus_int16 size[48],
int *payload_offset
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5);
/** Gets the bandwidth of an Opus packet.
* @param [in] data <tt>char*</tt>: Opus packet
* @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass)
* @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass)
* @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass)
* @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass)
* @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass)
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_bandwidth(const unsigned char *data) OPUS_ARG_NONNULL(1);
/** Gets the number of samples per frame from an Opus packet.
* @param [in] data <tt>char*</tt>: Opus packet.
* This must contain at least one byte of
* data.
* @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.
* This must be a multiple of 400, or
* inaccurate results will be returned.
* @returns Number of samples per frame.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_samples_per_frame(const unsigned char *data, opus_int32 Fs) OPUS_ARG_NONNULL(1);
/** Gets the number of channels from an Opus packet.
* @param [in] data <tt>char*</tt>: Opus packet
* @returns Number of channels
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsigned char *data) OPUS_ARG_NONNULL(1);
/** Gets the number of frames in an Opus packet.
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @returns Number of frames
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1);
/** Gets the number of samples of an Opus packet.
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.
* This must be a multiple of 400, or
* inaccurate results will be returned.
* @returns Number of samples
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1);
/** Gets the number of samples of an Opus packet.
* @param [in] dec <tt>OpusDecoder*</tt>: Decoder state
* @param [in] packet <tt>char*</tt>: Opus packet
* @param [in] len <tt>opus_int32</tt>: Length of packet
* @returns Number of samples
* @retval OPUS_BAD_ARG Insufficient data was passed to the function
* @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
/** Applies soft-clipping to bring a float signal within the [-1,1] range. If
* the signal is already in that range, nothing is done. If there are values
* outside of [-1,1], then the signal is clipped as smoothly as possible to
* both fit in the range and avoid creating excessive distortion in the
* process.
* @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM
* @param [in] frame_size <tt>int</tt> Number of samples per channel to process
* @param [in] channels <tt>int</tt>: Number of channels
* @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero)
*/
OPUS_EXPORT void opus_pcm_soft_clip(float *pcm, int frame_size, int channels, float *softclip_mem);
/**@}*/
/** @defgroup opus_repacketizer Repacketizer
* @{
*
* The repacketizer can be used to merge multiple Opus packets into a single
* packet or alternatively to split Opus packets that have previously been
* merged. Splitting valid Opus packets is always guaranteed to succeed,
* whereas merging valid packets only succeeds if all frames have the same
* mode, bandwidth, and frame size, and when the total duration of the merged
* packet is no more than 120 ms. The 120 ms limit comes from the
* specification and limits decoder memory requirements at a point where
* framing overhead becomes negligible.
*
* The repacketizer currently only operates on elementary Opus
* streams. It will not manipualte multistream packets successfully, except in
* the degenerate case where they consist of data from a single stream.
*
* The repacketizing process starts with creating a repacketizer state, either
* by calling opus_repacketizer_create() or by allocating the memory yourself,
* e.g.,
* @code
* OpusRepacketizer *rp;
* rp = (OpusRepacketizer*)malloc(opus_repacketizer_get_size());
* if (rp != NULL)
* opus_repacketizer_init(rp);
* @endcode
*
* Then the application should submit packets with opus_repacketizer_cat(),
* extract new packets with opus_repacketizer_out() or
* opus_repacketizer_out_range(), and then reset the state for the next set of
* input packets via opus_repacketizer_init().
*
* For example, to split a sequence of packets into individual frames:
* @code
* unsigned char *data;
* int len;
* while (get_next_packet(&data, &len))
* {
* unsigned char out[1276];
* opus_int32 out_len;
* int nb_frames;
* int err;
* int i;
* err = opus_repacketizer_cat(rp, data, len);
* if (err != OPUS_OK)
* {
* release_packet(data);
* return err;
* }
* nb_frames = opus_repacketizer_get_nb_frames(rp);
* for (i = 0; i < nb_frames; i++)
* {
* out_len = opus_repacketizer_out_range(rp, i, i+1, out, sizeof(out));
* if (out_len < 0)
* {
* release_packet(data);
* return (int)out_len;
* }
* output_next_packet(out, out_len);
* }
* opus_repacketizer_init(rp);
* release_packet(data);
* }
* @endcode
*
* Alternatively, to combine a sequence of frames into packets that each
* contain up to <code>TARGET_DURATION_MS</code> milliseconds of data:
* @code
* // The maximum number of packets with duration TARGET_DURATION_MS occurs
* // when the frame size is 2.5 ms, for a total of (TARGET_DURATION_MS*2/5)
* // packets.
* unsigned char *data[(TARGET_DURATION_MS*2/5)+1];
* opus_int32 len[(TARGET_DURATION_MS*2/5)+1];
* int nb_packets;
* unsigned char out[1277*(TARGET_DURATION_MS*2/2)];
* opus_int32 out_len;
* int prev_toc;
* nb_packets = 0;
* while (get_next_packet(data+nb_packets, len+nb_packets))
* {
* int nb_frames;
* int err;
* nb_frames = opus_packet_get_nb_frames(data[nb_packets], len[nb_packets]);
* if (nb_frames < 1)
* {
* release_packets(data, nb_packets+1);
* return nb_frames;
* }
* nb_frames += opus_repacketizer_get_nb_frames(rp);
* // If adding the next packet would exceed our target, or it has an
* // incompatible TOC sequence, output the packets we already have before
* // submitting it.
* // N.B., The nb_packets > 0 check ensures we've submitted at least one
* // packet since the last call to opus_repacketizer_init(). Otherwise a
* // single packet longer than TARGET_DURATION_MS would cause us to try to
* // output an (invalid) empty packet. It also ensures that prev_toc has
* // been set to a valid value. Additionally, len[nb_packets] > 0 is
* // guaranteed by the call to opus_packet_get_nb_frames() above, so the
* // reference to data[nb_packets][0] should be valid.
* if (nb_packets > 0 && (
* ((prev_toc & 0xFC) != (data[nb_packets][0] & 0xFC)) ||
* opus_packet_get_samples_per_frame(data[nb_packets], 48000)*nb_frames >
* TARGET_DURATION_MS*48))
* {
* out_len = opus_repacketizer_out(rp, out, sizeof(out));
* if (out_len < 0)
* {
* release_packets(data, nb_packets+1);
* return (int)out_len;
* }
* output_next_packet(out, out_len);
* opus_repacketizer_init(rp);
* release_packets(data, nb_packets);
* data[0] = data[nb_packets];
* len[0] = len[nb_packets];
* nb_packets = 0;
* }
* err = opus_repacketizer_cat(rp, data[nb_packets], len[nb_packets]);
* if (err != OPUS_OK)
* {
* release_packets(data, nb_packets+1);
* return err;
* }
* prev_toc = data[nb_packets][0];
* nb_packets++;
* }
* // Output the final, partial packet.
* if (nb_packets > 0)
* {
* out_len = opus_repacketizer_out(rp, out, sizeof(out));
* release_packets(data, nb_packets);
* if (out_len < 0)
* return (int)out_len;
* output_next_packet(out, out_len);
* }
* @endcode
*
* An alternate way of merging packets is to simply call opus_repacketizer_cat()
* unconditionally until it fails. At that point, the merged packet can be
* obtained with opus_repacketizer_out() and the input packet for which
* opus_repacketizer_cat() needs to be re-added to a newly reinitialized
* repacketizer state.
*/
typedef struct OpusRepacketizer OpusRepacketizer;
/** Gets the size of an <code>OpusRepacketizer</code> structure.
* @returns The size in bytes.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_size(void);
/** (Re)initializes a previously allocated repacketizer state.
* The state must be at least the size returned by opus_repacketizer_get_size().
* This can be used for applications which use their own allocator instead of
* malloc().
* It must also be called to reset the queue of packets waiting to be
* repacketized, which is necessary if the maximum packet duration of 120 ms
* is reached or if you wish to submit packets with a different Opus
* configuration (coding mode, audio bandwidth, frame size, or channel count).
* Failure to do so will prevent a new packet from being added with
* opus_repacketizer_cat().
* @see opus_repacketizer_create
* @see opus_repacketizer_get_size
* @see opus_repacketizer_cat
* @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to
* (re)initialize.
* @returns A pointer to the same repacketizer state that was passed in.
*/
OPUS_EXPORT OpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);
/** Allocates memory and initializes the new repacketizer with
* opus_repacketizer_init().
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusRepacketizer *opus_repacketizer_create(void);
/** Frees an <code>OpusRepacketizer</code> allocated by
* opus_repacketizer_create().
* @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed.
*/
OPUS_EXPORT void opus_repacketizer_destroy(OpusRepacketizer *rp);
/** Add a packet to the current repacketizer state.
* This packet must match the configuration of any packets already submitted
* for repacketization since the last call to opus_repacketizer_init().
* This means that it must have the same coding mode, audio bandwidth, frame
* size, and channel count.
* This can be checked in advance by examining the top 6 bits of the first
* byte of the packet, and ensuring they match the top 6 bits of the first
* byte of any previously submitted packet.
* The total duration of audio in the repacketizer state also must not exceed
* 120 ms, the maximum duration of a single packet, after adding this packet.
*
* The contents of the current repacketizer state can be extracted into new
* packets using opus_repacketizer_out() or opus_repacketizer_out_range().
*
* In order to add a packet with a different configuration or to add more
* audio beyond 120 ms, you must clear the repacketizer state by calling
* opus_repacketizer_init().
* If a packet is too large to add to the current repacketizer state, no part
* of it is added, even if it contains multiple frames, some of which might
* fit.
* If you wish to be able to add parts of such packets, you should first use
* another repacketizer to split the packet into pieces and add them
* individually.
* @see opus_repacketizer_out_range
* @see opus_repacketizer_out
* @see opus_repacketizer_init
* @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to
* add the packet.
* @param[in] data <tt>const unsigned char*</tt>: The packet data.
* The application must ensure
* this pointer remains valid
* until the next call to
* opus_repacketizer_init() or
* opus_repacketizer_destroy().
* @param len <tt>opus_int32</tt>: The number of bytes in the packet data.
* @returns An error code indicating whether or not the operation succeeded.
* @retval #OPUS_OK The packet's contents have been added to the repacketizer
* state.
* @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence,
* the packet's TOC sequence was not compatible
* with previously submitted packets (because
* the coding mode, audio bandwidth, frame size,
* or channel count did not match), or adding
* this packet would increase the total amount of
* audio stored in the repacketizer state to more
* than 120 ms.
*/
OPUS_EXPORT int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
/** Construct a new packet from data previously submitted to the repacketizer
* state via opus_repacketizer_cat().
* @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to
* construct the new packet.
* @param begin <tt>int</tt>: The index of the first frame in the current
* repacketizer state to include in the output.
* @param end <tt>int</tt>: One past the index of the last frame in the
* current repacketizer state to include in the
* output.
* @param[out] data <tt>const unsigned char*</tt>: The buffer in which to
* store the output packet.
* @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in
* the output buffer. In order to guarantee
* success, this should be at least
* <code>1276</code> for a single frame,
* or for multiple frames,
* <code>1277*(end-begin)</code>.
* However, <code>1*(end-begin)</code> plus
* the size of all packet data submitted to
* the repacketizer since the last call to
* opus_repacketizer_init() or
* opus_repacketizer_create() is also
* sufficient, and possibly much smaller.
* @returns The total size of the output packet on success, or an error code
* on failure.
* @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of
* frames (begin < 0, begin >= end, or end >
* opus_repacketizer_get_nb_frames()).
* @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the
* complete output packet.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out_range(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Return the total number of frames contained in packet data submitted to
* the repacketizer state so far via opus_repacketizer_cat() since the last
* call to opus_repacketizer_init() or opus_repacketizer_create().
* This defines the valid range of packets that can be extracted with
* opus_repacketizer_out_range() or opus_repacketizer_out().
* @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the
* frames.
* @returns The total number of frames contained in the packet data submitted
* to the repacketizer state.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1);
/** Construct a new packet from data previously submitted to the repacketizer
* state via opus_repacketizer_cat().
* This is a convenience routine that returns all the data submitted so far
* in a single packet.
* It is equivalent to calling
* @code
* opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp),
* data, maxlen)
* @endcode
* @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to
* construct the new packet.
* @param[out] data <tt>const unsigned char*</tt>: The buffer in which to
* store the output packet.
* @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in
* the output buffer. In order to guarantee
* success, this should be at least
* <code>1277*opus_repacketizer_get_nb_frames(rp)</code>.
* However,
* <code>1*opus_repacketizer_get_nb_frames(rp)</code>
* plus the size of all packet data
* submitted to the repacketizer since the
* last call to opus_repacketizer_init() or
* opus_repacketizer_create() is also
* sufficient, and possibly much smaller.
* @returns The total size of the output packet on success, or an error code
* on failure.
* @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the
* complete output packet.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1);
/** Pads a given Opus packet to a larger size (possibly changing the TOC sequence).
* @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
* packet to pad.
* @param len <tt>opus_int32</tt>: The size of the packet.
* This must be at least 1.
* @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.
* This must be at least as large as len.
* @returns an error code
* @retval #OPUS_OK \a on success.
* @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len.
* @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
*/
OPUS_EXPORT int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len);
/** Remove all padding from a given Opus packet and rewrite the TOC sequence to
* minimize space usage.
* @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
* packet to strip.
* @param len <tt>opus_int32</tt>: The size of the packet.
* This must be at least 1.
* @returns The new size of the output packet on success, or an error code
* on failure.
* @retval #OPUS_BAD_ARG \a len was less than 1.
* @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len);
/** Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence).
* @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
* packet to pad.
* @param len <tt>opus_int32</tt>: The size of the packet.
* This must be at least 1.
* @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.
* This must be at least 1.
* @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.
* This must be at least as large as len.
* @returns an error code
* @retval #OPUS_OK \a on success.
* @retval #OPUS_BAD_ARG \a len was less than 1.
* @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
*/
OPUS_EXPORT int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams);
/** Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to
* minimize space usage.
* @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the
* packet to strip.
* @param len <tt>opus_int32</tt>: The size of the packet.
* This must be at least 1.
* @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.
* This must be at least 1.
* @returns The new size of the output packet on success, or an error code
* on failure.
* @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len.
* @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif /* OPUS_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_custom.h
================================================
/* Copyright (c) 2007-2008 CSIRO
Copyright (c) 2007-2009 Xiph.Org Foundation
Copyright (c) 2008-2012 Gregory Maxwell
Written by Jean-Marc Valin and Gregory Maxwell */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
@file opus_custom.h
@brief Opus-Custom reference implementation API
*/
#ifndef OPUS_CUSTOM_H
#define OPUS_CUSTOM_H
#include "opus_defines.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef CUSTOM_MODES
# define OPUS_CUSTOM_EXPORT OPUS_EXPORT
# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT
#else
# define OPUS_CUSTOM_EXPORT
# ifdef OPUS_BUILD
# define OPUS_CUSTOM_EXPORT_STATIC static OPUS_INLINE
# else
# define OPUS_CUSTOM_EXPORT_STATIC
# endif
#endif
/** @defgroup opus_custom Opus Custom
* @{
* Opus Custom is an optional part of the Opus specification and
* reference implementation which uses a distinct API from the regular
* API and supports frame sizes that are not normally supported.\ Use
* of Opus Custom is discouraged for all but very special applications
* for which a frame size different from 2.5, 5, 10, or 20 ms is needed
* (for either complexity or latency reasons) and where interoperability
* is less important.
*
* In addition to the interoperability limitations the use of Opus custom
* disables a substantial chunk of the codec and generally lowers the
* quality available at a given bitrate. Normally when an application needs
* a different frame size from the codec it should buffer to match the
* sizes but this adds a small amount of delay which may be important
* in some very low latency applications. Some transports (especially
* constant rate RF transports) may also work best with frames of
* particular durations.
*
* Libopus only supports custom modes if they are enabled at compile time.
*
* The Opus Custom API is similar to the regular API but the
* @ref opus_encoder_create and @ref opus_decoder_create calls take
* an additional mode parameter which is a structure produced by
* a call to @ref opus_custom_mode_create. Both the encoder and decoder
* must create a mode using the same sample rate (fs) and frame size
* (frame size) so these parameters must either be signaled out of band
* or fixed in a particular implementation.
*
* Similar to regular Opus the custom modes support on the fly frame size
* switching, but the sizes available depend on the particular frame size in
* use. For some initial frame sizes on a single on the fly size is available.
*/
/** Contains the state of an encoder. One encoder state is needed
for each stream. It is initialized once at the beginning of the
stream. Do *not* re-initialize the state for every frame.
@brief Encoder state
*/
typedef struct OpusCustomEncoder OpusCustomEncoder;
/** State of the decoder. One decoder state is needed for each stream.
It is initialized once at the beginning of the stream. Do *not*
re-initialize the state for every frame.
@brief Decoder state
*/
typedef struct OpusCustomDecoder OpusCustomDecoder;
/** The mode contains all the information necessary to create an
encoder. Both the encoder and decoder need to be initialized
with exactly the same mode, otherwise the output will be
corrupted.
@brief Mode configuration
*/
typedef struct OpusCustomMode OpusCustomMode;
/** Creates a new mode struct. This will be passed to an encoder or
* decoder. The mode MUST NOT BE DESTROYED until the encoders and
* decoders that use it are destroyed as well.
* @param [in] Fs <tt>int</tt>: Sampling rate (8000 to 96000 Hz)
* @param [in] frame_size <tt>int</tt>: Number of samples (per channel) to encode in each
* packet (64 - 1024, prime factorization must contain zero or more 2s, 3s, or 5s and no other primes)
* @param [out] error <tt>int*</tt>: Returned error code (if NULL, no error will be returned)
* @return A newly created mode
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error);
/** Destroys a mode struct. Only call this after all encoders and
* decoders using this mode are destroyed as well.
* @param [in] mode <tt>OpusCustomMode*</tt>: Mode to be freed.
*/
OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);
#if !defined(OPUS_BUILD) || defined(CELT_ENCODER_C)
/* Encoder */
/** Gets the size of an OpusCustomEncoder structure.
* @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration
* @param [in] channels <tt>int</tt>: Number of channels
* @returns size
*/
OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size(
const OpusCustomMode *mode,
int channels
) OPUS_ARG_NONNULL(1);
# ifdef CUSTOM_MODES
/** Initializes a previously allocated encoder state
* The memory pointed to by st must be the size returned by opus_custom_encoder_get_size.
* This is intended for applications which use their own allocator instead of malloc.
* @see opus_custom_encoder_create(),opus_custom_encoder_get_size()
* To reset a previously initialized state use the OPUS_RESET_STATE CTL.
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
* @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of
* the stream (must be the same characteristics as used for the
* decoder)
* @param [in] channels <tt>int</tt>: Number of channels
* @return OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_CUSTOM_EXPORT int opus_custom_encoder_init(
OpusCustomEncoder *st,
const OpusCustomMode *mode,
int channels
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
# endif
#endif
/** Creates a new encoder state. Each stream needs its own encoder
* state (can't be shared across simultaneous streams).
* @param [in] mode <tt>OpusCustomMode*</tt>: Contains all the information about the characteristics of
* the stream (must be the same characteristics as used for the
* decoder)
* @param [in] channels <tt>int</tt>: Number of channels
* @param [out] error <tt>int*</tt>: Returns an error code
* @return Newly created encoder state.
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encoder_create(
const OpusCustomMode *mode,
int channels,
int *error
) OPUS_ARG_NONNULL(1);
/** Destroys a an encoder state.
* @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed.
*/
OPUS_CUSTOM_EXPORT void opus_custom_encoder_destroy(OpusCustomEncoder *st);
/** Encodes a frame of audio.
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
* @param [in] pcm <tt>float*</tt>: PCM audio in float format, with a normal range of +/-1.0.
* Samples with a range beyond +/-1.0 are supported but will
* be clipped by decoders using the integer API and should
* only be used if it is known that the far end supports
* extended dynamic range. There must be exactly
* frame_size samples per channel.
* @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal
* @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.
* @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame
* (can change from one frame to another)
* @return Number of bytes written to "compressed".
* If negative, an error has occurred (see error codes). It is IMPORTANT that
* the length returned be somehow transmitted to the decoder. Otherwise, no
* decoding is possible.
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode_float(
OpusCustomEncoder *st,
const float *pcm,
int frame_size,
unsigned char *compressed,
int maxCompressedBytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Encodes a frame of audio.
* @param [in] st <tt>OpusCustomEncoder*</tt>: Encoder state
* @param [in] pcm <tt>opus_int16*</tt>: PCM audio in signed 16-bit format (native endian).
* There must be exactly frame_size samples per channel.
* @param [in] frame_size <tt>int</tt>: Number of samples per frame of input signal
* @param [out] compressed <tt>char *</tt>: The compressed data is written here. This may not alias pcm and must be at least maxCompressedBytes long.
* @param [in] maxCompressedBytes <tt>int</tt>: Maximum number of bytes to use for compressing the frame
* (can change from one frame to another)
* @return Number of bytes written to "compressed".
* If negative, an error has occurred (see error codes). It is IMPORTANT that
* the length returned be somehow transmitted to the decoder. Otherwise, no
* decoding is possible.
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode(
OpusCustomEncoder *st,
const opus_int16 *pcm,
int frame_size,
unsigned char *compressed,
int maxCompressedBytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Perform a CTL function on an Opus custom encoder.
*
* Generally the request and subsequent arguments are generated
* by a convenience macro.
* @see opus_encoderctls
*/
OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
#if !defined(OPUS_BUILD) || defined(CELT_DECODER_C)
/* Decoder */
/** Gets the size of an OpusCustomDecoder structure.
* @param [in] mode <tt>OpusCustomMode *</tt>: Mode configuration
* @param [in] channels <tt>int</tt>: Number of channels
* @returns size
*/
OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_decoder_get_size(
const OpusCustomMode *mode,
int channels
) OPUS_ARG_NONNULL(1);
/** Initializes a previously allocated decoder state
* The memory pointed to by st must be the size returned by opus_custom_decoder_get_size.
* This is intended for applications which use their own allocator instead of malloc.
* @see opus_custom_decoder_create(),opus_custom_decoder_get_size()
* To reset a previously initialized state use the OPUS_RESET_STATE CTL.
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
* @param [in] mode <tt>OpusCustomMode *</tt>: Contains all the information about the characteristics of
* the stream (must be the same characteristics as used for the
* encoder)
* @param [in] channels <tt>int</tt>: Number of channels
* @return OPUS_OK Success or @ref opus_errorcodes
*/
OPUS_CUSTOM_EXPORT_STATIC int opus_custom_decoder_init(
OpusCustomDecoder *st,
const OpusCustomMode *mode,
int channels
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
#endif
/** Creates a new decoder state. Each stream needs its own decoder state (can't
* be shared across simultaneous streams).
* @param [in] mode <tt>OpusCustomMode</tt>: Contains all the information about the characteristics of the
* stream (must be the same characteristics as used for the encoder)
* @param [in] channels <tt>int</tt>: Number of channels
* @param [out] error <tt>int*</tt>: Returns an error code
* @return Newly created decoder state.
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create(
const OpusCustomMode *mode,
int channels,
int *error
) OPUS_ARG_NONNULL(1);
/** Destroys a an decoder state.
* @param[in] st <tt>OpusCustomDecoder*</tt>: State to be freed.
*/
OPUS_CUSTOM_EXPORT void opus_custom_decoder_destroy(OpusCustomDecoder *st);
/** Decode an opus custom frame with floating point output
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
* @param [in] len <tt>int</tt>: Number of bytes in payload
* @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(float)
* @param [in] frame_size Number of samples per channel of available space in *pcm.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode_float(
OpusCustomDecoder *st,
const unsigned char *data,
int len,
float *pcm,
int frame_size
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Decode an opus custom frame
* @param [in] st <tt>OpusCustomDecoder*</tt>: Decoder state
* @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss
* @param [in] len <tt>int</tt>: Number of bytes in payload
* @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length
* is frame_size*channels*sizeof(opus_int16)
* @param [in] frame_size Number of samples per channel of available space in *pcm.
* @returns Number of decoded samples or @ref opus_errorcodes
*/
OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_decode(
OpusCustomDecoder *st,
const unsigned char *data,
int len,
opus_int16 *pcm,
int frame_size
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Perform a CTL function on an Opus custom decoder.
*
* Generally the request and subsequent arguments are generated
* by a convenience macro.
* @see opus_genericctls
*/
OPUS_CUSTOM_EXPORT int opus_custom_decoder_ctl(OpusCustomDecoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif /* OPUS_CUSTOM_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_defines.h
================================================
/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
Written by Jean-Marc Valin and Koen Vos */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file opus_defines.h
* @brief Opus reference implementation constants
*/
#ifndef OPUS_DEFINES_H
#define OPUS_DEFINES_H
#include "opus_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @defgroup opus_errorcodes Error codes
* @{
*/
/** No error @hideinitializer*/
#define OPUS_OK 0
/** One or more invalid/out of range arguments @hideinitializer*/
#define OPUS_BAD_ARG -1
/** Not enough bytes allocated in the buffer @hideinitializer*/
#define OPUS_BUFFER_TOO_SMALL -2
/** An internal error was detected @hideinitializer*/
#define OPUS_INTERNAL_ERROR -3
/** The compressed data passed is corrupted @hideinitializer*/
#define OPUS_INVALID_PACKET -4
/** Invalid/unsupported request number @hideinitializer*/
#define OPUS_UNIMPLEMENTED -5
/** An encoder or decoder structure is invalid or already freed @hideinitializer*/
#define OPUS_INVALID_STATE -6
/** Memory allocation has failed @hideinitializer*/
#define OPUS_ALLOC_FAIL -7
/**@}*/
/** @cond OPUS_INTERNAL_DOC */
/**Export control for opus functions */
#ifndef OPUS_EXPORT
# if defined(WIN32)
# if defined(OPUS_BUILD) && defined(DLL_EXPORT)
# define OPUS_EXPORT __declspec(dllexport)
# else
# define OPUS_EXPORT
# endif
# elif defined(__GNUC__) && defined(OPUS_BUILD)
# define OPUS_EXPORT __attribute__ ((visibility ("default")))
# else
# define OPUS_EXPORT
# endif
#endif
# if !defined(OPUS_GNUC_PREREQ)
# if defined(__GNUC__)&&defined(__GNUC_MINOR__)
# define OPUS_GNUC_PREREQ(_maj,_min) \
((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
# else
# define OPUS_GNUC_PREREQ(_maj,_min) 0
# endif
# endif
#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
# if OPUS_GNUC_PREREQ(3,0)
# define OPUS_RESTRICT __restrict__
# elif (defined(_MSC_VER) && _MSC_VER >= 1400)
# define OPUS_RESTRICT __restrict
# else
# define OPUS_RESTRICT
# endif
#else
# define OPUS_RESTRICT restrict
#endif
#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
# if OPUS_GNUC_PREREQ(2,7)
# define OPUS_INLINE __inline__
# elif (defined(_MSC_VER))
# define OPUS_INLINE __inline
# else
# define OPUS_INLINE
# endif
#else
# define OPUS_INLINE inline
#endif
/**Warning attributes for opus functions
* NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out
* some paranoid null checks. */
#if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
# define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
#else
# define OPUS_WARN_UNUSED_RESULT
#endif
#if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
# define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x)))
#else
# define OPUS_ARG_NONNULL(_x)
#endif
/** These are the actual Encoder CTL ID numbers.
* They should not be used directly by applications.
* In general, SETs should be even and GETs should be odd.*/
#define OPUS_SET_APPLICATION_REQUEST 4000
#define OPUS_GET_APPLICATION_REQUEST 4001
#define OPUS_SET_BITRATE_REQUEST 4002
#define OPUS_GET_BITRATE_REQUEST 4003
#define OPUS_SET_MAX_BANDWIDTH_REQUEST 4004
#define OPUS_GET_MAX_BANDWIDTH_REQUEST 4005
#define OPUS_SET_VBR_REQUEST 4006
#define OPUS_GET_VBR_REQUEST 4007
#define OPUS_SET_BANDWIDTH_REQUEST 4008
#define OPUS_GET_BANDWIDTH_REQUEST 4009
#define OPUS_SET_COMPLEXITY_REQUEST 4010
#define OPUS_GET_COMPLEXITY_REQUEST 4011
#define OPUS_SET_INBAND_FEC_REQUEST 4012
#define OPUS_GET_INBAND_FEC_REQUEST 4013
#define OPUS_SET_PACKET_LOSS_PERC_REQUEST 4014
#define OPUS_GET_PACKET_LOSS_PERC_REQUEST 4015
#define OPUS_SET_DTX_REQUEST 4016
#define OPUS_GET_DTX_REQUEST 4017
#define OPUS_SET_VBR_CONSTRAINT_REQUEST 4020
#define OPUS_GET_VBR_CONSTRAINT_REQUEST 4021
#define OPUS_SET_FORCE_CHANNELS_REQUEST 4022
#define OPUS_GET_FORCE_CHANNELS_REQUEST 4023
#define OPUS_SET_SIGNAL_REQUEST 4024
#define OPUS_GET_SIGNAL_REQUEST 4025
#define OPUS_GET_LOOKAHEAD_REQUEST 4027
/* #define OPUS_RESET_STATE 4028 */
#define OPUS_GET_SAMPLE_RATE_REQUEST 4029
#define OPUS_GET_FINAL_RANGE_REQUEST 4031
#define OPUS_GET_PITCH_REQUEST 4033
#define OPUS_SET_GAIN_REQUEST 4034
#define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */
#define OPUS_SET_LSB_DEPTH_REQUEST 4036
#define OPUS_GET_LSB_DEPTH_REQUEST 4037
#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039
#define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040
#define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041
#define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042
#define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043
/* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */
#define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046
#define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047
#define OPUS_GET_IN_DTX_REQUEST 4049
/** Defines for the presence of extended APIs. */
#define OPUS_HAVE_OPUS_PROJECTION_H
/* Macros to trigger compilation errors when the wrong types are provided to a CTL */
#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
#define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
#define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
#define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
/** @endcond */
/** @defgroup opus_ctlvalues Pre-defined values for CTL interface
* @see opus_genericctls, opus_encoderctls
* @{
*/
/* Values for the various encoder CTLs */
#define OPUS_AUTO -1000 /**<Auto/default setting @hideinitializer*/
#define OPUS_BITRATE_MAX -1 /**<Maximum bitrate @hideinitializer*/
/** Best for most VoIP/videoconference applications where listening quality and intelligibility matter most
* @hideinitializer */
#define OPUS_APPLICATION_VOIP 2048
/** Best for broadcast/high-fidelity application where the decoded audio should be as close as possible to the input
* @hideinitializer */
#define OPUS_APPLICATION_AUDIO 2049
/** Only use when lowest-achievable latency is what matters most. Voice-optimized modes cannot be used.
* @hideinitializer */
#define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051
#define OPUS_SIGNAL_VOICE 3001 /**< Signal being encoded is voice */
#define OPUS_SIGNAL_MUSIC 3002 /**< Signal being encoded is music */
#define OPUS_BANDWIDTH_NARROWBAND 1101 /**< 4 kHz bandpass @hideinitializer*/
#define OPUS_BANDWIDTH_MEDIUMBAND 1102 /**< 6 kHz bandpass @hideinitializer*/
#define OPUS_BANDWIDTH_WIDEBAND 1103 /**< 8 kHz bandpass @hideinitializer*/
#define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12 kHz bandpass @hideinitializer*/
#define OPUS_BANDWIDTH_FULLBAND 1105 /**<20 kHz bandpass @hideinitializer*/
#define OPUS_FRAMESIZE_ARG 5000 /**< Select frame size from the argument (default) */
#define OPUS_FRAMESIZE_2_5_MS 5001 /**< Use 2.5 ms frames */
#define OPUS_FRAMESIZE_5_MS 5002 /**< Use 5 ms frames */
#define OPUS_FRAMESIZE_10_MS 5003 /**< Use 10 ms frames */
#define OPUS_FRAMESIZE_20_MS 5004 /**< Use 20 ms frames */
#define OPUS_FRAMESIZE_40_MS 5005 /**< Use 40 ms frames */
#define OPUS_FRAMESIZE_60_MS 5006 /**< Use 60 ms frames */
#define OPUS_FRAMESIZE_80_MS 5007 /**< Use 80 ms frames */
#define OPUS_FRAMESIZE_100_MS 5008 /**< Use 100 ms frames */
#define OPUS_FRAMESIZE_120_MS 5009 /**< Use 120 ms frames */
/**@}*/
/** @defgroup opus_encoderctls Encoder related CTLs
*
* These are convenience macros for use with the \c opus_encode_ctl
* interface. They are used to generate the appropriate series of
* arguments for that call, passing the correct type, size and so
* on as expected for each particular request.
*
* Some usage examples:
*
* @code
* int ret;
* ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO));
* if (ret != OPUS_OK) return ret;
*
* opus_int32 rate;
* opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate));
*
* opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);
* @endcode
*
* @see opus_genericctls, opus_encoder
* @{
*/
/** Configures the encoder's computational complexity.
* The supported range is 0-10 inclusive with 10 representing the highest complexity.
* @see OPUS_GET_COMPLEXITY
* @param[in] x <tt>opus_int32</tt>: Allowed values: 0-10, inclusive.
*
* @hideinitializer */
#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_int(x)
/** Gets the encoder's complexity configuration.
* @see OPUS_SET_COMPLEXITY
* @param[out] x <tt>opus_int32 *</tt>: Returns a value in the range 0-10,
* inclusive.
* @hideinitializer */
#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __opus_check_int_ptr(x)
/** Configures the bitrate in the encoder.
* Rates from 500 to 512000 bits per second are meaningful, as well as the
* special values #OPUS_AUTO and #OPUS_BITRATE_MAX.
* The value #OPUS_BITRATE_MAX can be used to cause the codec to use as much
* rate as it can, which is useful for controlling the rate by adjusting the
* output buffer size.
* @see OPUS_GET_BITRATE
* @param[in] x <tt>opus_int32</tt>: Bitrate in bits per second. The default
* is determined based on the number of
* channels and the input sampling rate.
* @hideinitializer */
#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __opus_check_int(x)
/** Gets the encoder's bitrate configuration.
* @see OPUS_SET_BITRATE
* @param[out] x <tt>opus_int32 *</tt>: Returns the bitrate in bits per second.
* The default is determined based on the
* number of channels and the input
* sampling rate.
* @hideinitializer */
#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __opus_check_int_ptr(x)
/** Enables or disables variable bitrate (VBR) in the encoder.
* The configured bitrate may not be met exactly because frames must
* be an integer number of bytes in length.
* @see OPUS_GET_VBR
* @see OPUS_SET_VBR_CONSTRAINT
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Hard CBR. For LPC/hybrid modes at very low bit-rate, this can
* cause noticeable quality degradation.</dd>
* <dt>1</dt><dd>VBR (default). The exact type of VBR is controlled by
* #OPUS_SET_VBR_CONSTRAINT.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __opus_check_int(x)
/** Determine if variable bitrate (VBR) is enabled in the encoder.
* @see OPUS_SET_VBR
* @see OPUS_GET_VBR_CONSTRAINT
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>Hard CBR.</dd>
* <dt>1</dt><dd>VBR (default). The exact type of VBR may be retrieved via
* #OPUS_GET_VBR_CONSTRAINT.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __opus_check_int_ptr(x)
/** Enables or disables constrained VBR in the encoder.
* This setting is ignored when the encoder is in CBR mode.
* @warning Only the MDCT mode of Opus currently heeds the constraint.
* Speech mode ignores it completely, hybrid mode may fail to obey it
* if the LPC layer uses more bitrate than the constraint would have
* permitted.
* @see OPUS_GET_VBR_CONSTRAINT
* @see OPUS_SET_VBR
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Unconstrained VBR.</dd>
* <dt>1</dt><dd>Constrained VBR (default). This creates a maximum of one
* frame of buffering delay assuming a transport with a
* serialization speed of the nominal bitrate.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __opus_check_int(x)
/** Determine if constrained VBR is enabled in the encoder.
* @see OPUS_SET_VBR_CONSTRAINT
* @see OPUS_GET_VBR
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>Unconstrained VBR.</dd>
* <dt>1</dt><dd>Constrained VBR (default).</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __opus_check_int_ptr(x)
/** Configures mono/stereo forcing in the encoder.
* This can force the encoder to produce packets encoded as either mono or
* stereo, regardless of the format of the input audio. This is useful when
* the caller knows that the input signal is currently a mono source embedded
* in a stereo stream.
* @see OPUS_GET_FORCE_CHANNELS
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>
* <dt>1</dt> <dd>Forced mono</dd>
* <dt>2</dt> <dd>Forced stereo</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, __opus_check_int(x)
/** Gets the encoder's forced channel configuration.
* @see OPUS_SET_FORCE_CHANNELS
* @param[out] x <tt>opus_int32 *</tt>:
* <dl>
* <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd>
* <dt>1</dt> <dd>Forced mono</dd>
* <dt>2</dt> <dd>Forced stereo</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x)
/** Configures the maximum bandpass that the encoder will select automatically.
* Applications should normally use this instead of #OPUS_SET_BANDWIDTH
* (leaving that set to the default, #OPUS_AUTO). This allows the
* application to set an upper bound based on the type of input it is
* providing, but still gives the encoder the freedom to reduce the bandpass
* when the bitrate becomes too low, for better overall quality.
* @see OPUS_GET_MAX_BANDWIDTH
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
* <dt>OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
* <dt>OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
* <dt>OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
* <dt>OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured maximum allowed bandpass.
* @see OPUS_SET_MAX_BANDWIDTH
* @param[out] x <tt>opus_int32 *</tt>: Allowed values:
* <dl>
* <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
/** Sets the encoder's bandpass to a specific value.
* This prevents the encoder from automatically selecting the bandpass based
* on the available bitrate. If an application knows the bandpass of the input
* audio it is providing, it should normally use #OPUS_SET_MAX_BANDWIDTH
* instead, which still gives the encoder the freedom to reduce the bandpass
* when the bitrate becomes too low, for better overall quality.
* @see OPUS_GET_BANDWIDTH
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
* <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x)
/** Configures the type of signal being encoded.
* This is a hint which helps the encoder's mode selection.
* @see OPUS_GET_SIGNAL
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
* <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>
* <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured signal type.
* @see OPUS_SET_SIGNAL
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
* <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd>
* <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x)
/** Configures the encoder's intended application.
* The initial value is a mandatory argument to the encoder_create function.
* @see OPUS_GET_APPLICATION
* @param[in] x <tt>opus_int32</tt>: Returns one of the following values:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured application.
* @see OPUS_SET_APPLICATION
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x)
/** Gets the total samples of delay added by the entire codec.
* This can be queried by the encoder and then the provided number of samples can be
* skipped on from the start of the decoder's output to provide time aligned input
* and output. From the perspective of a decoding application the real data begins this many
* samples late.
*
* The decoder contribution to this delay is identical for all decoders, but the
* encoder portion of the delay may vary from implementation to implementation,
* version to version, or even depend on the encoder's initial configuration.
* Applications needing delay compensation should call this CTL rather than
* hard-coding a value.
* @param[out] x <tt>opus_int32 *</tt>: Number of lookahead samples
* @hideinitializer */
#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x)
/** Configures the encoder's use of inband forward error correction (FEC).
* @note This is only applicable to the LPC layer
* @see OPUS_GET_INBAND_FEC
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Disable inband FEC (default).</dd>
* <dt>1</dt><dd>Enable inband FEC.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x)
/** Gets encoder's configured use of inband forward error correction.
* @see OPUS_SET_INBAND_FEC
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>Inband FEC disabled (default).</dd>
* <dt>1</dt><dd>Inband FEC enabled.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x)
/** Configures the encoder's expected packet loss percentage.
* Higher values trigger progressively more loss resistant behavior in the encoder
* at the expense of quality at a given bitrate in the absence of packet loss, but
* greater quality under loss.
* @see OPUS_GET_PACKET_LOSS_PERC
* @param[in] x <tt>opus_int32</tt>: Loss percentage in the range 0-100, inclusive (default: 0).
* @hideinitializer */
#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured packet loss percentage.
* @see OPUS_SET_PACKET_LOSS_PERC
* @param[out] x <tt>opus_int32 *</tt>: Returns the configured loss percentage
* in the range 0-100, inclusive (default: 0).
* @hideinitializer */
#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x)
/** Configures the encoder's use of discontinuous transmission (DTX).
* @note This is only applicable to the LPC layer
* @see OPUS_GET_DTX
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Disable DTX (default).</dd>
* <dt>1</dt><dd>Enabled DTX.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x)
/** Gets encoder's configured use of discontinuous transmission.
* @see OPUS_SET_DTX
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>DTX disabled (default).</dd>
* <dt>1</dt><dd>DTX enabled.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x)
/** Configures the depth of signal being encoded.
*
* This is a hint which helps the encoder identify silence and near-silence.
* It represents the number of significant bits of linear intensity below
* which the signal contains ignorable quantization or other noise.
*
* For example, OPUS_SET_LSB_DEPTH(14) would be an appropriate setting
* for G.711 u-law input. OPUS_SET_LSB_DEPTH(16) would be appropriate
* for 16-bit linear pcm input with opus_encode_float().
*
* When using opus_encode() instead of opus_encode_float(), or when libopus
* is compiled for fixed-point, the encoder uses the minimum of the value
* set here and the value 16.
*
* @see OPUS_GET_LSB_DEPTH
* @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24
* (default: 24).
* @hideinitializer */
#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured signal depth.
* @see OPUS_SET_LSB_DEPTH
* @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and
* 24 (default: 24).
* @hideinitializer */
#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)
/** Configures the encoder's use of variable duration frames.
* When variable duration is enabled, the encoder is free to use a shorter frame
* size than the one requested in the opus_encode*() call.
* It is then the user's responsibility
* to verify how much audio was encoded by checking the ToC byte of the encoded
* packet. The part of the audio that was not encoded needs to be resent to the
* encoder for the next call. Do not use this option unless you <b>really</b>
* know what you are doing.
* @see OPUS_GET_EXPERT_FRAME_DURATION
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>
* <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_80_MS</dt><dd>Use 80 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_100_MS</dt><dd>Use 100 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_120_MS</dt><dd>Use 120 ms frames.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured use of variable duration frames.
* @see OPUS_SET_EXPERT_FRAME_DURATION
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd>
* <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_80_MS</dt><dd>Use 80 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_100_MS</dt><dd>Use 100 ms frames.</dd>
* <dt>OPUS_FRAMESIZE_120_MS</dt><dd>Use 120 ms frames.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int_ptr(x)
/** If set to 1, disables almost all use of prediction, making frames almost
* completely independent. This reduces quality.
* @see OPUS_GET_PREDICTION_DISABLED
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Enable prediction (default).</dd>
* <dt>1</dt><dd>Disable prediction.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured prediction status.
* @see OPUS_SET_PREDICTION_DISABLED
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>Prediction enabled (default).</dd>
* <dt>1</dt><dd>Prediction disabled.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_genericctls Generic CTLs
*
* These macros are used with the \c opus_decoder_ctl and
* \c opus_encoder_ctl calls to generate a particular
* request.
*
* When called on an \c OpusDecoder they apply to that
* particular decoder instance. When called on an
* \c OpusEncoder they apply to the corresponding setting
* on that encoder instance, if present.
*
* Some usage examples:
*
* @code
* int ret;
* opus_int32 pitch;
* ret = opus_decoder_ctl(dec_ctx, OPUS_GET_PITCH(&pitch));
* if (ret == OPUS_OK) return ret;
*
* opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);
* opus_decoder_ctl(dec_ctx, OPUS_RESET_STATE);
*
* opus_int32 enc_bw, dec_bw;
* opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&enc_bw));
* opus_decoder_ctl(dec_ctx, OPUS_GET_BANDWIDTH(&dec_bw));
* if (enc_bw != dec_bw) {
* printf("packet bandwidth mismatch!\n");
* }
* @endcode
*
* @see opus_encoder, opus_decoder_ctl, opus_encoder_ctl, opus_decoderctls, opus_encoderctls
* @{
*/
/** Resets the codec state to be equivalent to a freshly initialized state.
* This should be called when switching streams in order to prevent
* the back to back decoding from giving different results from
* one at a time decoding.
* @hideinitializer */
#define OPUS_RESET_STATE 4028
/** Gets the final state of the codec's entropy coder.
* This is used for testing purposes,
* The encoder and decoder state should be identical after coding a payload
* (assuming no data corruption or software bugs)
*
* @param[out] x <tt>opus_uint32 *</tt>: Entropy coder state
*
* @hideinitializer */
#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_uint_ptr(x)
/** Gets the encoder's configured bandpass or the decoder's last bandpass.
* @see OPUS_SET_BANDWIDTH
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>#OPUS_AUTO</dt> <dd>(default)</dd>
* <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd>
* <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
/** Gets the sampling rate the encoder or decoder was initialized with.
* This simply returns the <code>Fs</code> value passed to opus_encoder_init()
* or opus_decoder_init().
* @param[out] x <tt>opus_int32 *</tt>: Sampling rate of encoder or decoder.
* @hideinitializer
*/
#define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(x)
/** If set to 1, disables the use of phase inversion for intensity stereo,
* improving the quality of mono downmixes, but slightly reducing normal
* stereo quality. Disabling phase inversion in the decoder does not comply
* with RFC 6716, although it does not cause any interoperability issue and
* is expected to become part of the Opus standard once RFC 6716 is updated
* by draft-ietf-codec-opus-update.
* @see OPUS_GET_PHASE_INVERSION_DISABLED
* @param[in] x <tt>opus_int32</tt>: Allowed values:
* <dl>
* <dt>0</dt><dd>Enable phase inversion (default).</dd>
* <dt>1</dt><dd>Disable phase inversion.</dd>
* </dl>
* @hideinitializer */
#define OPUS_SET_PHASE_INVERSION_DISABLED(x) OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST, __opus_check_int(x)
/** Gets the encoder's configured phase inversion status.
* @see OPUS_SET_PHASE_INVERSION_DISABLED
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>Stereo phase inversion enabled (default).</dd>
* <dt>1</dt><dd>Stereo phase inversion disabled.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_PHASE_INVERSION_DISABLED(x) OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST, __opus_check_int_ptr(x)
/** Gets the DTX state of the encoder.
* Returns whether the last encoded frame was either a comfort noise update
* during DTX or not encoded because of DTX.
* @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values:
* <dl>
* <dt>0</dt><dd>The encoder is not in DTX.</dd>
* <dt>1</dt><dd>The encoder is in DTX.</dd>
* </dl>
* @hideinitializer */
#define OPUS_GET_IN_DTX(x) OPUS_GET_IN_DTX_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_decoderctls Decoder related CTLs
* @see opus_genericctls, opus_encoderctls, opus_decoder
* @{
*/
/** Configures decoder gain adjustment.
* Scales the decoded output by a factor specified in Q8 dB units.
* This has a maximum range of -32768 to 32767 inclusive, and returns
* OPUS_BAD_ARG otherwise. The default is zero indicating no adjustment.
* This setting survives decoder reset.
*
* gain = pow(10, x/(20.0*256))
*
* @param[in] x <tt>opus_int32</tt>: Amount to scale PCM signal by in Q8 dB units.
* @hideinitializer */
#define OPUS_SET_GAIN(x) OPUS_SET_GAIN_REQUEST, __opus_check_int(x)
/** Gets the decoder's configured gain adjustment. @see OPUS_SET_GAIN
*
* @param[out] x <tt>opus_int32 *</tt>: Amount to scale PCM signal by in Q8 dB units.
* @hideinitializer */
#define OPUS_GET_GAIN(x) OPUS_GET_GAIN_REQUEST, __opus_check_int_ptr(x)
/** Gets the duration (in samples) of the last packet successfully decoded or concealed.
* @param[out] x <tt>opus_int32 *</tt>: Number of samples (at current sampling rate).
* @hideinitializer */
#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x)
/** Gets the pitch of the last decoded frame, if available.
* This can be used for any post-processing algorithm requiring the use of pitch,
* e.g. time stretching/shortening. If the last frame was not voiced, or if the
* pitch was not coded in the frame, then zero is returned.
*
* This CTL is only implemented for decoder instances.
*
* @param[out] x <tt>opus_int32 *</tt>: pitch period at 48 kHz (or 0 if not available)
*
* @hideinitializer */
#define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_libinfo Opus library information functions
* @{
*/
/** Converts an opus error code into a human readable string.
*
* @param[in] error <tt>int</tt>: Error number
* @returns Error string
*/
OPUS_EXPORT const char *opus_strerror(int error);
/** Gets the libopus version string.
*
* Applications may look for the substring "-fixed" in the version string to
* determine whether they have a fixed-point or floating-point build at
* runtime.
*
* @returns Version string
*/
OPUS_EXPORT const char *opus_get_version_string(void);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif /* OPUS_DEFINES_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_multistream.h
================================================
/* Copyright (c) 2011 Xiph.Org Foundation
Written by Jean-Marc Valin */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file opus_multistream.h
* @brief Opus reference implementation multistream API
*/
#ifndef OPUS_MULTISTREAM_H
#define OPUS_MULTISTREAM_H
#include "opus.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @cond OPUS_INTERNAL_DOC */
/** Macros to trigger compilation errors when the wrong types are provided to a
* CTL. */
/**@{*/
#define __opus_check_encstate_ptr(ptr) ((ptr) + ((ptr) - (OpusEncoder**)(ptr)))
#define __opus_check_decstate_ptr(ptr) ((ptr) + ((ptr) - (OpusDecoder**)(ptr)))
/**@}*/
/** These are the actual encoder and decoder CTL ID numbers.
* They should not be used directly by applications.
* In general, SETs should be even and GETs should be odd.*/
/**@{*/
#define OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST 5120
#define OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST 5122
/**@}*/
/** @endcond */
/** @defgroup opus_multistream_ctls Multistream specific encoder and decoder CTLs
*
* These are convenience macros that are specific to the
* opus_multistream_encoder_ctl() and opus_multistream_decoder_ctl()
* interface.
* The CTLs from @ref opus_genericctls, @ref opus_encoderctls, and
* @ref opus_decoderctls may be applied to a multistream encoder or decoder as
* well.
* In addition, you may retrieve the encoder or decoder state for an specific
* stream via #OPUS_MULTISTREAM_GET_ENCODER_STATE or
* #OPUS_MULTISTREAM_GET_DECODER_STATE and apply CTLs to it individually.
*/
/**@{*/
/** Gets the encoder state for an individual stream of a multistream encoder.
* @param[in] x <tt>opus_int32</tt>: The index of the stream whose encoder you
* wish to retrieve.
* This must be non-negative and less than
* the <code>streams</code> parameter used
* to initialize the encoder.
* @param[out] y <tt>OpusEncoder**</tt>: Returns a pointer to the given
* encoder state.
* @retval OPUS_BAD_ARG The index of the requested stream was out of range.
* @hideinitializer
*/
#define OPUS_MULTISTREAM_GET_ENCODER_STATE(x,y) OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, __opus_check_int(x), __opus_check_encstate_ptr(y)
/** Gets the decoder state for an individual stream of a multistream decoder.
* @param[in] x <tt>opus_int32</tt>: The index of the stream whose decoder you
* wish to retrieve.
* This must be non-negative and less than
* the <code>streams</code> parameter used
* to initialize the decoder.
* @param[out] y <tt>OpusDecoder**</tt>: Returns a pointer to the given
* decoder state.
* @retval OPUS_BAD_ARG The index of the requested stream was out of range.
* @hideinitializer
*/
#define OPUS_MULTISTREAM_GET_DECODER_STATE(x,y) OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST, __opus_check_int(x), __opus_check_decstate_ptr(y)
/**@}*/
/** @defgroup opus_multistream Opus Multistream API
* @{
*
* The multistream API allows individual Opus streams to be combined into a
* single packet, enabling support for up to 255 channels. Unlike an
* elementary Opus stream, the encoder and decoder must negotiate the channel
* configuration before the decoder can successfully interpret the data in the
* packets produced by the encoder. Some basic information, such as packet
* duration, can be computed without any special negotiation.
*
* The format for multistream Opus packets is defined in
* <a href="https://tools.ietf.org/html/rfc7845">RFC 7845</a>
* and is based on the self-delimited Opus framing described in Appendix B of
* <a href="https://tools.ietf.org/html/rfc6716">RFC 6716</a>.
* Normal Opus packets are just a degenerate case of multistream Opus packets,
* and can be encoded or decoded with the multistream API by setting
* <code>streams</code> to <code>1</code> when initializing the encoder or
* decoder.
*
* Multistream Opus streams can contain up to 255 elementary Opus streams.
* These may be either "uncoupled" or "coupled", indicating that the decoder
* is configured to decode them to either 1 or 2 channels, respectively.
* The streams are ordered so that all coupled streams appear at the
* beginning.
*
* A <code>mapping</code> table defines which decoded channel <code>i</code>
* should be used for each input/output (I/O) channel <code>j</code>. This table is
* typically provided as an unsigned char array.
* Let <code>i = mapping[j]</code> be the index for I/O channel <code>j</code>.
* If <code>i < 2*coupled_streams</code>, then I/O channel <code>j</code> is
* encoded as the left channel of stream <code>(i/2)</code> if <code>i</code>
* is even, or as the right channel of stream <code>(i/2)</code> if
* <code>i</code> is odd. Otherwise, I/O channel <code>j</code> is encoded as
* mono in stream <code>(i - coupled_streams)</code>, unless it has the special
* value 255, in which case it is omitted from the encoding entirely (the
* decoder will reproduce it as silence). Each value <code>i</code> must either
* be the special value 255 or be less than <code>streams + coupled_streams</code>.
*
* The output channels specified by the encoder
* should use the
* <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">Vorbis
* channel ordering</a>. A decoder may wish to apply an additional permutation
* to the mapping the encoder used to achieve a different output channel
* order (e.g. for outputing in WAV order).
*
* Each multistream packet contains an Opus packet for each stream, and all of
* the Opus packets in a single multistream packet must have the same
* duration. Therefore the duration of a multistream packet can be extracted
* from the TOC sequence of the first stream, which is located at the
* beginning of the packet, just like an elementary Opus stream:
*
* @code
* int nb_samples;
* int nb_frames;
* nb_frames = opus_packet_get_nb_frames(data, len);
* if (nb_frames < 1)
* return nb_frames;
* nb_samples = opus_packet_get_samples_per_frame(data, 48000) * nb_frames;
* @endcode
*
* The general encoding and decoding process proceeds exactly the same as in
* the normal @ref opus_encoder and @ref opus_decoder APIs.
* See their documentation for an overview of how to use the corresponding
* multistream functions.
*/
/** Opus multistream encoder state.
* This contains the complete state of a multistream Opus encoder.
* It is position independent and can be freely copied.
* @see opus_multistream_encoder_create
* @see opus_multistream_encoder_init
*/
typedef struct OpusMSEncoder OpusMSEncoder;
/** Opus multistream decoder state.
* This contains the complete state of a multistream Opus decoder.
* It is position independent and can be freely copied.
* @see opus_multistream_decoder_create
* @see opus_multistream_decoder_init
*/
typedef struct OpusMSDecoder OpusMSDecoder;
/**\name Multistream encoder functions */
/**@{*/
/** Gets the size of an OpusMSEncoder structure.
* @param streams <tt>int</tt>: The total number of streams to encode from the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
* to encode.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* encoded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @returns The size in bytes on success, or a negative error code
* (see @ref opus_errorcodes) on error.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get_size(
int streams,
int coupled_streams
);
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_encoder_get_size(
int channels,
int mapping_family
);
/** Allocates and initializes a multistream encoder state.
* Call opus_multistream_encoder_destroy() to release
* this object when finished.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels in the input signal.
* This must be at most 255.
* It may be greater than the number of
* coded channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams to encode from the
* input.
* This must be no more than the number of channels.
* @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
* to encode.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* encoded channels (<code>streams +
* coupled_streams</code>) must be no
* more than the number of input channels.
* @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
* encoded channels to input channels, as described in
* @ref opus_multistream. As an extra constraint, the
* multistream encoder does not allow encoding coupled
* streams for which one channel is unused since this
* is never a good idea.
* @param application <tt>int</tt>: The target encoder application.
* This must be one of the following:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
* code (see @ref opus_errorcodes) on
* failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder_create(
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
const unsigned char *mapping,
int application,
int *error
) OPUS_ARG_NONNULL(5);
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surround_encoder_create(
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
unsigned char *mapping,
int application,
int *error
) OPUS_ARG_NONNULL(4) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6);
/** Initialize a previously allocated multistream encoder state.
* The memory pointed to by \a st must be at least the size returned by
* opus_multistream_encoder_get_size().
* This is intended for applications which use their own allocator instead of
* malloc.
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @see opus_multistream_encoder_create
* @see opus_multistream_encoder_get_size
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels in the input signal.
* This must be at most 255.
* It may be greater than the number of
* coded channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams to encode from the
* input.
* This must be no more than the number of channels.
* @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
* to encode.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* encoded channels (<code>streams +
* coupled_streams</code>) must be no
* more than the number of input channels.
* @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
* encoded channels to input channels, as described in
* @ref opus_multistream. As an extra constraint, the
* multistream encoder does not allow encoding coupled
* streams for which one channel is unused since this
* is never a good idea.
* @param application <tt>int</tt>: The target encoder application.
* This must be one of the following:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
* on failure.
*/
OPUS_EXPORT int opus_multistream_encoder_init(
OpusMSEncoder *st,
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
const unsigned char *mapping,
int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
OPUS_EXPORT int opus_multistream_surround_encoder_init(
OpusMSEncoder *st,
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
unsigned char *mapping,
int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6) OPUS_ARG_NONNULL(7);
/** Encodes a multistream Opus frame.
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
* @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved
* samples.
* This must contain
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: Number of samples per channel in the input
* signal.
* This must be an Opus frame size for the
* encoder's sampling rate.
* For example, at 48 kHz the permitted values
* are 120, 240, 480, 960, 1920, and 2880.
* Passing in a duration of less than 10 ms
* (480 samples at 48 kHz) will prevent the
* encoder from using the LPC or hybrid modes.
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode(
OpusMSEncoder *st,
const opus_int16 *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Encodes a multistream Opus frame from floating point input.
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
* @param[in] pcm <tt>const float*</tt>: The input signal as interleaved
* samples with a normal range of
* +/-1.0.
* Samples with a range beyond +/-1.0
* are supported but will be clipped by
* decoders using the integer API and
* should only be used if it is known
* that the far end supports extended
* dynamic range.
* This must contain
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: Number of samples per channel in the input
* signal.
* This must be an Opus frame size for the
* encoder's sampling rate.
* For example, at 48 kHz the permitted values
* are 120, 240, 480, 960, 1920, and 2880.
* Passing in a duration of less than 10 ms
* (480 samples at 48 kHz) will prevent the
* encoder from using the LPC or hybrid modes.
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode_float(
OpusMSEncoder *st,
const float *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Frees an <code>OpusMSEncoder</code> allocated by
* opus_multistream_encoder_create().
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to be freed.
*/
OPUS_EXPORT void opus_multistream_encoder_destroy(OpusMSEncoder *st);
/** Perform a CTL function on a multistream Opus encoder.
*
* Generally the request and subsequent arguments are generated by a
* convenience macro.
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls,
* @ref opus_encoderctls, or @ref opus_multistream_ctls.
* @see opus_genericctls
* @see opus_encoderctls
* @see opus_multistream_ctls
*/
OPUS_EXPORT int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/**@}*/
/**\name Multistream decoder functions */
/**@{*/
/** Gets the size of an <code>OpusMSDecoder</code> structure.
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @returns The size in bytes on success, or a negative error code
* (see @ref opus_errorcodes) on error.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_decoder_get_size(
int streams,
int coupled_streams
);
/** Allocates and initializes a multistream decoder state.
* Call opus_multistream_decoder_destroy() to release
* this object when finished.
* @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels to output.
* This must be at most 255.
* It may be different from the number of coded
* channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
* coded channels to output channels, as described in
* @ref opus_multistream.
* @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
* code (see @ref opus_errorcodes) on
* failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSDecoder *opus_multistream_decoder_create(
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
const unsigned char *mapping,
int *error
) OPUS_ARG_NONNULL(5);
/** Intialize a previously allocated decoder state object.
* The memory pointed to by \a st must be at least the size returned by
* opus_multistream_encoder_get_size().
* This is intended for applications which use their own allocator instead of
* malloc.
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @see opus_multistream_decoder_create
* @see opus_multistream_deocder_get_size
* @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
* @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels to output.
* This must be at most 255.
* It may be different from the number of coded
* channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
* coded channels to output channels, as described in
* @ref opus_multistream.
* @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
* on failure.
*/
OPUS_EXPORT int opus_multistream_decoder_init(
OpusMSDecoder *st,
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
const unsigned char *mapping
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
/** Decode a multistream Opus packet.
* @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
* @param[in] data <tt>const unsigned char*</tt>: Input payload.
* Use a <code>NULL</code>
* pointer to indicate packet
* loss.
* @param len <tt>opus_int32</tt>: Number of bytes in payload.
* @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
* samples.
* This must contain room for
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: The number of samples per channel of
* available space in \a pcm.
* If this is less than the maximum packet duration
* (120 ms; 5760 for 48kHz), this function will not be capable
* of decoding some packets. In the case of PLC (data==NULL)
* or FEC (decode_fec=1), then frame_size needs to be exactly
* the duration of audio that is missing, otherwise the
* decoder will not be in the optimal state to decode the
* next incoming packet. For the PLC and FEC cases, frame_size
* <b>must</b> be a multiple of 2.5 ms.
* @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
* forward error correction data be decoded.
* If no such data is available, the frame is
* decoded as if it were lost.
* @returns Number of samples decoded on success or a negative error code
* (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode(
OpusMSDecoder *st,
const unsigned char *data,
opus_int32 len,
opus_int16 *pcm,
int frame_size,
int decode_fec
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Decode a multistream Opus packet with floating point output.
* @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
* @param[in] data <tt>const unsigned char*</tt>: Input payload.
* Use a <code>NULL</code>
* pointer to indicate packet
* loss.
* @param len <tt>opus_int32</tt>: Number of bytes in payload.
* @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
* samples.
* This must contain room for
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: The number of samples per channel of
* available space in \a pcm.
* If this is less than the maximum packet duration
* (120 ms; 5760 for 48kHz), this function will not be capable
* of decoding some packets. In the case of PLC (data==NULL)
* or FEC (decode_fec=1), then frame_size needs to be exactly
* the duration of audio that is missing, otherwise the
* decoder will not be in the optimal state to decode the
* next incoming packet. For the PLC and FEC cases, frame_size
* <b>must</b> be a multiple of 2.5 ms.
* @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
* forward error correction data be decoded.
* If no such data is available, the frame is
* decoded as if it were lost.
* @returns Number of samples decoded on success or a negative error code
* (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode_float(
OpusMSDecoder *st,
const unsigned char *data,
opus_int32 len,
float *pcm,
int frame_size,
int decode_fec
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
/** Perform a CTL function on a multistream Opus decoder.
*
* Generally the request and subsequent arguments are generated by a
* convenience macro.
* @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls,
* @ref opus_decoderctls, or @ref opus_multistream_ctls.
* @see opus_genericctls
* @see opus_decoderctls
* @see opus_multistream_ctls
*/
OPUS_EXPORT int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/** Frees an <code>OpusMSDecoder</code> allocated by
* opus_multistream_decoder_create().
* @param st <tt>OpusMSDecoder</tt>: Multistream decoder state to be freed.
*/
OPUS_EXPORT void opus_multistream_decoder_destroy(OpusMSDecoder *st);
/**@}*/
/**@}*/
#ifdef __cplusplus
}
#endif
#endif /* OPUS_MULTISTREAM_H */
================================================
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_projection.h
================================================
/* Copyright (c) 2017 Google Inc.
Written by Andrew Allen */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file opus_projection.h
* @brief Opus projection reference API
*/
#ifndef OPUS_PROJECTION_H
#define OPUS_PROJECTION_H
#include "opus_multistream.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @cond OPUS_INTERNAL_DOC */
/** These are the actual encoder and decoder CTL ID numbers.
* They should not be used directly by applications.c
* In general, SETs should be even and GETs should be odd.*/
/**@{*/
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN_REQUEST 6001
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE_REQUEST 6003
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST 6005
/**@}*/
/** @endcond */
/** @defgroup opus_projection_ctls Projection specific encoder and decoder CTLs
*
* These are convenience macros that are specific to the
* opus_projection_encoder_ctl() and opus_projection_decoder_ctl()
* interface.
* The CTLs from @ref opus_genericctls, @ref opus_encoderctls,
* @ref opus_decoderctls, and @ref opus_multistream_ctls may be applied to a
* projection encoder or decoder as well.
*/
/**@{*/
/** Gets the gain (in dB. S7.8-format) of the demixing matrix from the encoder.
* @param[out] x <tt>opus_int32 *</tt>: Returns the gain (in dB. S7.8-format)
* of the demixing matrix.
* @hideinitializer
*/
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN(x) OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN_REQUEST, __opus_check_int_ptr(x)
/** Gets the size in bytes of the demixing matrix from the encoder.
* @param[out] x <tt>opus_int32 *</tt>: Returns the size in bytes of the
* demixing matrix.
* @hideinitializer
*/
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE(x) OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE_REQUEST, __opus_check_int_ptr(x)
/** Copies the demixing matrix to the supplied pointer location.
* @param[out] x <tt>unsigned char *</tt>: Returns the demixing matrix to the
* supplied pointer location.
* @param y <tt>opus_int32</tt>: The size in bytes of the reserved memory at the
* pointer location.
* @hideinitializer
*/
#define OPUS_PROJECTION_GET_DEMIXING_MATRIX(x,y) OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST, x, __opus_check_int(y)
/**@}*/
/** Opus projection encoder state.
* This contains the complete state of a projection Opus encoder.
* It is position independent and can be freely copied.
* @see opus_projection_ambisonics_encoder_create
*/
typedef struct OpusProjectionEncoder OpusProjectionEncoder;
/** Opus projection decoder state.
* This contains the complete state of a projection Opus decoder.
* It is position independent and can be freely copied.
* @see opus_projection_decoder_create
* @see opus_projection_decoder_init
*/
typedef struct OpusProjectionDecoder OpusProjectionDecoder;
/**\name Projection encoder functions */
/**@{*/
/** Gets the size of an OpusProjectionEncoder structure.
* @param channels <tt>int</tt>: The total number of input channels to encode.
* This must be no more than 255.
* @param mapping_family <tt>int</tt>: The mapping family to use for selecting
* the appropriate projection.
* @returns The size in bytes on success, or a negative error code
* (see @ref opus_errorcodes) on error.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_projection_ambisonics_encoder_get_size(
int channels,
int mapping_family
);
/** Allocates and initializes a projection encoder state.
* Call opus_projection_encoder_destroy() to release
* this object when finished.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels in the input signal.
* This must be at most 255.
* It may be greater than the number of
* coded channels (<code>streams +
* coupled_streams</code>).
* @param mapping_family <tt>int</tt>: The mapping family to use for selecting
* the appropriate projection.
* @param[out] streams <tt>int *</tt>: The total number of streams that will
* be encoded from the input.
* @param[out] coupled_streams <tt>int *</tt>: Number of coupled (2 channel)
* streams that will be encoded from the input.
* @param application <tt>int</tt>: The target encoder application.
* This must be one of the following:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
* code (see @ref opus_errorcodes) on
* failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusProjectionEncoder *opus_projection_ambisonics_encoder_create(
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
int application,
int *error
) OPUS_ARG_NONNULL(4) OPUS_ARG_NONNULL(5);
/** Initialize a previously allocated projection encoder state.
* The memory pointed to by \a st must be at least the size returned by
* opus_projection_ambisonics_encoder_get_size().
* This is intended for applications which use their own allocator instead of
* malloc.
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @see opus_projection_ambisonics_encoder_create
* @see opus_projection_ambisonics_encoder_get_size
* @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state to initialize.
* @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels in the input signal.
* This must be at most 255.
* It may be greater than the number of
* coded channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams to encode from the
* input.
* This must be no more than the number of channels.
* @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
* to encode.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* encoded channels (<code>streams +
* coupled_streams</code>) must be no
* more than the number of input channels.
* @param application <tt>int</tt>: The target encoder application.
* This must be one of the following:
* <dl>
* <dt>#OPUS_APPLICATION_VOIP</dt>
* <dd>Process signal for improved speech intelligibility.</dd>
* <dt>#OPUS_APPLICATION_AUDIO</dt>
* <dd>Favor faithfulness to the original input.</dd>
* <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
* <dd>Configure the minimum possible coding delay by disabling certain modes
* of operation.</dd>
* </dl>
* @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
* on failure.
*/
OPUS_EXPORT int opus_projection_ambisonics_encoder_init(
OpusProjectionEncoder *st,
opus_int32 Fs,
int channels,
int mapping_family,
int *streams,
int *coupled_streams,
int application
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6);
/** Encodes a projection Opus frame.
* @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.
* @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved
* samples.
* This must contain
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: Number of samples per channel in the input
* signal.
* This must be an Opus frame size for the
* encoder's sampling rate.
* For example, at 48 kHz the permitted values
* are 120, 240, 480, 960, 1920, and 2880.
* Passing in a duration of less than 10 ms
* (480 samples at 48 kHz) will prevent the
* encoder from using the LPC or hybrid modes.
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_projection_encode(
OpusProjectionEncoder *st,
const opus_int16 *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Encodes a projection Opus frame from floating point input.
* @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.
* @param[in] pcm <tt>const float*</tt>: The input signal as interleaved
* samples with a normal range of
* +/-1.0.
* Samples with a range beyond +/-1.0
* are supported but will be clipped by
* decoders using the integer API and
* should only be used if it is known
* that the far end supports extended
* dynamic range.
* This must contain
* <code>frame_size*channels</code>
* samples.
* @param frame_size <tt>int</tt>: Number of samples per channel in the input
* signal.
* This must be an Opus frame size for the
* encoder's sampling rate.
* For example, at 48 kHz the permitted values
* are 120, 240, 480, 960, 1920, and 2880.
* Passing in a duration of less than 10 ms
* (480 samples at 48 kHz) will prevent the
* encoder from using the LPC or hybrid modes.
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_projection_encode_float(
OpusProjectionEncoder *st,
const float *pcm,
int frame_size,
unsigned char *data,
opus_int32 max_data_bytes
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
/** Frees an <code>OpusProjectionEncoder</code> allocated by
* opus_projection_ambisonics_encoder_create().
* @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state to be freed.
*/
OPUS_EXPORT void opus_projection_encoder_destroy(OpusProjectionEncoder *st);
/** Perform a CTL function on a projection Opus encoder.
*
* Generally the request and subsequent arguments are generated by a
* convenience macro.
* @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.
* @param request This and all remaining parameters should be replaced by one
* of the convenience macros in @ref opus_genericctls,
* @ref opus_encoderctls, @ref opus_multistream_ctls, or
* @ref opus_projection_ctls
* @see opus_genericctls
* @see opus_encoderctls
* @see opus_multistream_ctls
* @see opus_projection_ctls
*/
OPUS_EXPORT int opus_projection_encoder_ctl(OpusProjectionEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
/**@}*/
/**\name Projection decoder functions */
/**@{*/
/** Gets the size of an <code>OpusProjectionDecoder</code> structure.
* @param channels <tt>int</tt>: The total number of output channels.
* This must be no more than 255.
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @returns The size in bytes on success, or a negative error code
* (see @ref opus_errorcodes) on error.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_projection_decoder_get_size(
int channels,
int streams,
int coupled_streams
);
/** Allocates and initializes a projection decoder state.
* Call opus_projection_decoder_destroy() to release
* this object when finished.
* @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels to output.
* This must be at most 255.
* It may be different from the number of coded
* channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @param[in] demixing_matrix <tt>const unsigned char[demixing_matrix_size]</tt>: Demixing matrix
* that mapping from coded channels to output channels,
* as described in @ref opus_projection and
* @ref opus_projection_ctls.
* @param demixing_matrix_size <tt>opus_int32</tt>: The size in bytes of the
* demixing matrix, as
* described in @ref
* opus_projection_ctls.
* @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
* code (see @ref opus_errorcodes) on
* failure.
*/
OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusProjectionDecoder *opus_projection_decoder_create(
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
unsigned char *demixing_matrix,
opus_int32 demixing_matrix_size,
int *error
) OPUS_ARG_NONNULL(5);
/** Intialize a previously allocated projection decoder state object.
* The memory pointed to by \a st must be at least the size returned by
* opus_projection_decoder_get_size().
* This is intended for applications which use their own allocator instead of
* malloc.
* To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
* @see opus_projection_decoder_create
* @see opus_projection_deocder_get_size
* @param st <tt>OpusProjectionDecoder*</tt>: Projection encoder state to initialize.
* @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
* This must be one of 8000, 12000, 16000,
* 24000, or 48000.
* @param channels <tt>int</tt>: Number of channels to output.
* This must be at most 255.
* It may be different from the number of coded
* channels (<code>streams +
* coupled_streams</code>).
* @param streams <tt>int</tt>: The total number of streams coded in the
* input.
* This must be no more than 255.
* @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
* (2 channel) streams.
* This must be no larger than the total
* number of streams.
* Additionally, The total number of
* coded channels (<code>streams +
* coupled_streams</code>) must be no
* more than 255.
* @param[in] demixing_matrix <tt>const unsigned char[demixing_matrix_size]</tt>: Demixing matrix
* that mapping from coded channels to output channels,
* as described in @ref opus_projection and
* @ref opus_projection_ctls.
* @param demixing_matrix_size <tt>opus_int32</tt>: The size in bytes of the
* demixing matrix, as
* described in @ref
* opus_projection_ctls.
* @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
* on failure.
*/
OPUS_EXPORT int opus_projection_decoder_init(
OpusProjectionDecoder *st,
opus_int32 Fs,
int channels,
int streams,
int coupled_streams,
unsigned char *demixing_matrix,
opus_int32 demixing_matrix_size
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
/** Decode a projection Opus packet.
* @param st <tt>OpusProjectionDecoder*</tt>: Projection decoder state.
* @param[in] data <tt>const unsigned char*</tt>: Input payload.
* Use a <code>NULL</code>
* pointer to indicate packet
* loss.
* @param len <tt>opus_int32</tt>: Number of bytes in payload.
* @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
* samples.
* This must contain room for
* <code>frame_size*channels</code>
*
gitextract_hmb1u4o6/
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── SGM_android/
│ ├── .gitignore
│ ├── README.md
│ ├── SmartGlassesManager/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ ├── src/
│ │ │ ├── androidTest/
│ │ │ │ └── java/
│ │ │ │ └── com/
│ │ │ │ └── teamopensmartglasses/
│ │ │ │ └── smartglassesmanager/
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main/
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── cpp/
│ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ ├── jni/
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── ogg_opus_encoder.cc
│ │ │ │ │ │ └── ogg_opus_encoder.h
│ │ │ │ │ ├── libogg/
│ │ │ │ │ │ ├── Makefile.am
│ │ │ │ │ │ ├── config_types.h
│ │ │ │ │ │ ├── config_types.h.in
│ │ │ │ │ │ ├── ogg.h
│ │ │ │ │ │ └── os_types.h
│ │ │ │ │ ├── libopus/
│ │ │ │ │ │ ├── opus.h
│ │ │ │ │ │ ├── opus_custom.h
│ │ │ │ │ │ ├── opus_defines.h
│ │ │ │ │ │ ├── opus_multistream.h
│ │ │ │ │ │ ├── opus_projection.h
│ │ │ │ │ │ └── opus_types.h
│ │ │ │ │ ├── ogg_opus_encoder.cc
│ │ │ │ │ ├── ogg_opus_encoder.h
│ │ │ │ │ └── opus_tools/
│ │ │ │ │ └── opus_header.h
│ │ │ │ ├── java/
│ │ │ │ │ └── com/
│ │ │ │ │ └── teamopensmartglasses/
│ │ │ │ │ └── smartglassesmanager/
│ │ │ │ │ ├── SmartGlassesAndroidService.java
│ │ │ │ │ ├── SmartGlassesRepresentative.java
│ │ │ │ │ ├── comms/
│ │ │ │ │ │ ├── AspWebsocketServer.java
│ │ │ │ │ │ ├── AudioSystem.java
│ │ │ │ │ │ ├── MessageTypes.java
│ │ │ │ │ │ └── VolleyCallback.java
│ │ │ │ │ ├── eventbusmessages/
│ │ │ │ │ │ ├── AudioChunkNewEvent.java
│ │ │ │ │ │ ├── DisableBleScoAudioEvent.java
│ │ │ │ │ │ ├── GoogleAudioChunkNewEvent.java
│ │ │ │ │ │ ├── PauseAsrEvent.java
│ │ │ │ │ │ ├── PostGenericGlobalMessageEvent.java
│ │ │ │ │ │ ├── ScoStartEvent.java
│ │ │ │ │ │ ├── SetFontSizeEvent.java
│ │ │ │ │ │ ├── SmartGlassesConnectedEvent.java
│ │ │ │ │ │ ├── SmartGlassesConnectionEvent.java
│ │ │ │ │ │ ├── TextToSpeechEvent.java
│ │ │ │ │ │ └── VoskAudioChunkNewEvent.java
│ │ │ │ │ ├── hci/
│ │ │ │ │ │ ├── AudioChunkCallback.java
│ │ │ │ │ │ ├── HearItBleMicrophone.java
│ │ │ │ │ │ └── MicrophoneLocalAndBluetooth.java
│ │ │ │ │ ├── smartglassescommunicators/
│ │ │ │ │ │ ├── AndroidSGC.java
│ │ │ │ │ │ ├── AudioWearableSGC.java
│ │ │ │ │ │ ├── SmartGlassesCommunicator.java
│ │ │ │ │ │ ├── SmartGlassesFontSize.java
│ │ │ │ │ │ ├── SmartGlassesModes.java
│ │ │ │ │ │ ├── TextLineSG.java
│ │ │ │ │ │ ├── UltraliteLayoutHelper.java
│ │ │ │ │ │ └── UltraliteSGC.java
│ │ │ │ │ ├── speechrecognition/
│ │ │ │ │ │ ├── ASR_FRAMEWORKS.java
│ │ │ │ │ │ ├── SpeechRecFramework.java
│ │ │ │ │ │ ├── SpeechRecSwitchSystem.java
│ │ │ │ │ │ ├── azure/
│ │ │ │ │ │ │ ├── AzureAudioInputStream.java
│ │ │ │ │ │ │ └── SpeechRecAzure.java
│ │ │ │ │ │ ├── deepgram/
│ │ │ │ │ │ │ └── SpeechRecDeepgram.java
│ │ │ │ │ │ ├── google/
│ │ │ │ │ │ │ ├── SpeechRecGoogle.java
│ │ │ │ │ │ │ ├── asr/
│ │ │ │ │ │ │ │ ├── AlwaysSameSpeakerIDLabeler.java
│ │ │ │ │ │ │ │ ├── AlwaysSpeechPolicy.java
│ │ │ │ │ │ │ │ ├── RepeatingRecognitionSession.java
│ │ │ │ │ │ │ │ ├── RequestForRecognitionThread.java
│ │ │ │ │ │ │ │ ├── SafeTranscriptionResultFormatter.java
│ │ │ │ │ │ │ │ ├── SpeechDetectionPolicy.java
│ │ │ │ │ │ │ │ ├── SpeechSession.java
│ │ │ │ │ │ │ │ ├── SpeechSessionFactory.java
│ │ │ │ │ │ │ │ ├── SpeechSessionListener.java
│ │ │ │ │ │ │ │ ├── TimeUtil.java
│ │ │ │ │ │ │ │ ├── TranscriptionErrorPublisher.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultFormatter.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultReceiver.java
│ │ │ │ │ │ │ │ ├── TranscriptionResultUpdatePublisher.java
│ │ │ │ │ │ │ │ └── asrhelpers/
│ │ │ │ │ │ │ │ ├── CircularByteBuffer.java
│ │ │ │ │ │ │ │ ├── NetworkConnectionChecker.java
│ │ │ │ │ │ │ │ ├── ResponseTextUiAdapter.java
│ │ │ │ │ │ │ │ ├── SampleProcessorInterface.java
│ │ │ │ │ │ │ │ ├── SpeakerIDLabeler.java
│ │ │ │ │ │ │ │ └── StreamingAudioEncoder.java
│ │ │ │ │ │ │ └── gcloudspeech/
│ │ │ │ │ │ │ ├── CloudSpeechSession.java
│ │ │ │ │ │ │ ├── CloudSpeechSessionFactory.java
│ │ │ │ │ │ │ ├── CloudSpeechStreamObserver.java
│ │ │ │ │ │ │ └── TimestampCalculator.java
│ │ │ │ │ │ ├── vad/
│ │ │ │ │ │ │ └── VadGateSpeechPolicy.java
│ │ │ │ │ │ └── vosk/
│ │ │ │ │ │ └── SpeechRecVosk.java
│ │ │ │ │ ├── supportedglasses/
│ │ │ │ │ │ ├── AndroidPhoneTestGlasses.java
│ │ │ │ │ │ ├── AudioWearable.java
│ │ │ │ │ │ ├── EngoTwo.java
│ │ │ │ │ │ ├── EvenRealitiesG1.java
│ │ │ │ │ │ ├── InmoAirOne.java
│ │ │ │ │ │ ├── InmoGo.java
│ │ │ │ │ │ ├── SmartGlassesDevice.java
│ │ │ │ │ │ ├── SmartGlassesOperatingSystem.java
│ │ │ │ │ │ ├── TCLRayNeoXTwo.java
│ │ │ │ │ │ ├── VuzixShield.java
│ │ │ │ │ │ └── VuzixUltralite.java
│ │ │ │ │ ├── texttospeech/
│ │ │ │ │ │ └── TextToSpeechSystem.java
│ │ │ │ │ └── utils/
│ │ │ │ │ ├── AES.java
│ │ │ │ │ ├── BitmapJavaUtils.java
│ │ │ │ │ ├── NetworkUtils.java
│ │ │ │ │ └── PermissionsUtils.java
│ │ │ │ ├── proto/
│ │ │ │ │ └── com/
│ │ │ │ │ └── google/
│ │ │ │ │ └── audio/
│ │ │ │ │ ├── asr/
│ │ │ │ │ │ ├── cloud_speech_session_params.proto
│ │ │ │ │ │ ├── cloud_speech_stream_observer_params.proto
│ │ │ │ │ │ ├── speech_recognition_model_options.proto
│ │ │ │ │ │ ├── transcription_result.proto
│ │ │ │ │ │ └── transcription_result_formatter_options.proto
│ │ │ │ │ ├── codec_and_bitrate.proto
│ │ │ │ │ ├── network_state.proto
│ │ │ │ │ └── speaker_id_info.proto
│ │ │ │ └── res/
│ │ │ │ ├── drawable/
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ ├── outline_device_hub_24.xml
│ │ │ │ │ ├── outline_groups_24.xml
│ │ │ │ │ ├── outline_memory_24.xml
│ │ │ │ │ ├── outline_settings_24.xml
│ │ │ │ │ ├── pretty_thin_border.xml
│ │ │ │ │ ├── rounded_corner.xml
│ │ │ │ │ ├── rounded_corners_bg.xml
│ │ │ │ │ ├── rounded_shadow_bg.xml
│ │ │ │ │ ├── sgm_launcher_background.xml
│ │ │ │ │ ├── textview_background.xml
│ │ │ │ │ ├── wis_launcher_background.xml
│ │ │ │ │ └── wis_launcher_transparent_background.xml
│ │ │ │ ├── drawable-v24/
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── layout/
│ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ ├── all_transcripts_fragment.xml
│ │ │ │ │ ├── api_key_message.xml
│ │ │ │ │ ├── connecting_to_glasses_fragment.xml
│ │ │ │ │ ├── default_app_dialog.xml
│ │ │ │ │ ├── export_data_fragment.xml
│ │ │ │ │ ├── glasses_connected_fragment.xml
│ │ │ │ │ ├── image_item.xml
│ │ │ │ │ ├── main_ui_fragment.xml
│ │ │ │ │ ├── menu_item_exposed_dropdown.xml
│ │ │ │ │ ├── phrase_context_fragment.xml
│ │ │ │ │ ├── phrase_recyclerview_item.xml
│ │ │ │ │ ├── reference_card_recyclerview_item.xml
│ │ │ │ │ ├── response_text_box.xml
│ │ │ │ │ ├── select_glasses_fragment.xml
│ │ │ │ │ ├── settings_fragment.xml
│ │ │ │ │ ├── smart_glasses_debug_fragment.xml
│ │ │ │ │ └── smart_glasses_list_item.xml
│ │ │ │ ├── menu/
│ │ │ │ │ ├── bottom_nav_main_menu.xml
│ │ │ │ │ └── memory_cache_menu.xml
│ │ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ │ ├── sgm_launcher.xml
│ │ │ │ │ ├── sgm_launcher_round.xml
│ │ │ │ │ ├── wis_launcher.xml
│ │ │ │ │ ├── wis_launcher_round.xml
│ │ │ │ │ ├── wis_launcher_transparent.xml
│ │ │ │ │ └── wis_launcher_transparent_round.xml
│ │ │ │ ├── navigation/
│ │ │ │ │ └── nav_graph.xml
│ │ │ │ ├── values/
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ └── xml/
│ │ │ │ └── file_provider.xml
│ │ │ └── test/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── teamopensmartglasses/
│ │ │ └── smartglassesmanager/
│ │ │ └── ExampleUnitTest.java
│ │ └── third_party/
│ │ ├── CMakeLists.txt
│ │ ├── CMakeLists_libogg.txt
│ │ ├── CMakeLists_libopus.txt
│ │ ├── CMakeLists_opus-tools.txt
│ │ ├── libogg/
│ │ │ └── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libogg.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libogg.a
│ │ │ ├── x86/
│ │ │ │ └── libogg.a
│ │ │ └── x86_64/
│ │ │ └── libogg.a
│ │ ├── libopus/
│ │ │ └── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libopus.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libopus.a
│ │ │ ├── x86/
│ │ │ │ └── libopus.a
│ │ │ └── x86_64/
│ │ │ └── libopus.a
│ │ └── opus_tools/
│ │ ├── lib/
│ │ │ ├── arm64-v8a/
│ │ │ │ └── libopus_header.a
│ │ │ ├── armeabi-v7a/
│ │ │ │ └── libopus_header.a
│ │ │ ├── x86/
│ │ │ │ └── libopus_header.a
│ │ │ └── x86_64/
│ │ │ └── libopus_header.a
│ │ └── src/
│ │ ├── .gitignore
│ │ ├── AUTHORS
│ │ ├── CMakeLists.txt
│ │ ├── COPYING
│ │ ├── ChangeLog
│ │ ├── Makefile.am
│ │ ├── Makefile.unix
│ │ ├── NEWS
│ │ ├── README
│ │ ├── autogen.sh
│ │ ├── configure.ac
│ │ ├── man/
│ │ │ ├── opusdec.1
│ │ │ ├── opusenc.1
│ │ │ └── opusinfo.1
│ │ └── src/
│ │ ├── arch.h
│ │ ├── audio-in.c
│ │ ├── diag_range.c
│ │ ├── diag_range.h
│ │ ├── info_opus.c
│ │ ├── info_opus.h
│ │ ├── lpc.c
│ │ ├── lpc.h
│ │ ├── opus_header.c
│ │ ├── opus_header.h
│ │ ├── opusdec.c
│ │ ├── opusenc.c
│ │ ├── opusenc.h
│ │ ├── opusinfo.c
│ │ ├── opusinfo.h
│ │ ├── os_support.h
│ │ ├── resample.c
│ │ ├── speex_resampler.h
│ │ ├── stack_alloc.h
│ │ ├── wav_io.c
│ │ ├── wav_io.h
│ │ ├── wave_out.c
│ │ └── wave_out.h
│ ├── build.gradle
│ ├── build_all.sh
│ ├── build_log.txt
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── SGM_iOS/
│ └── SGM/
│ ├── .gitignore
│ ├── .swiftpm/
│ │ └── xcode/
│ │ └── package.xcworkspace/
│ │ └── xcshareddata/
│ │ └── IDEWorkspaceChecks.plist
│ ├── Package.resolved
│ ├── Package.swift
│ ├── Sources/
│ │ └── SGM/
│ │ └── SGM.swift
│ └── Tests/
│ └── SGMTests/
│ └── SGMTests.swift
├── android_smart_glasses_frontend/
│ ├── README.md
│ └── main/
│ ├── .gitignore
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── libs/
│ │ │ └── hiddencamera-release.aar
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── example/
│ │ │ └── wearableintelligencesystemandroidsmartglasses/
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets/
│ │ │ │ └── autocite_references.csv
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── wearableintelligencesystem/
│ │ │ │ └── androidsmartglasses/
│ │ │ │ ├── ASPClientSocket.java
│ │ │ │ ├── AudioSystem.java
│ │ │ │ ├── ImageAdapter.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── WearableAiService.java
│ │ │ │ ├── archive/
│ │ │ │ │ ├── AudioService.java
│ │ │ │ │ ├── GlboxClientSocket.java
│ │ │ │ │ └── SendImage.java
│ │ │ │ ├── comms/
│ │ │ │ │ ├── AsgWebSocketClient.java
│ │ │ │ │ ├── MessageTypes.java
│ │ │ │ │ ├── WebSocketManager.java
│ │ │ │ │ ├── WifiStatusCallback.java
│ │ │ │ │ └── WifiUtils.java
│ │ │ │ ├── sensors/
│ │ │ │ │ ├── AudioChunkCallback.java
│ │ │ │ │ ├── BluetoothMic.java
│ │ │ │ │ ├── BluetoothScanner.java
│ │ │ │ │ ├── Muse.java
│ │ │ │ │ └── MuseService.java
│ │ │ │ ├── ui/
│ │ │ │ │ ├── ASGFragment.java
│ │ │ │ │ ├── CommandPostUi.java
│ │ │ │ │ ├── CommandResolveUi.java
│ │ │ │ │ ├── ConvoModeUi.java
│ │ │ │ │ ├── HomePromptUi.java
│ │ │ │ │ ├── LanguageTranslateUi.java
│ │ │ │ │ ├── LiveLifeCaptionsUi.java
│ │ │ │ │ ├── ObjectTranslateUi.java
│ │ │ │ │ ├── ReferenceUi.java
│ │ │ │ │ ├── RequiredArgsUi.java
│ │ │ │ │ ├── SelectableImageGridUi.java
│ │ │ │ │ ├── TextWallUi.java
│ │ │ │ │ ├── UiUtils.java
│ │ │ │ │ ├── WakeWordPostUi.java
│ │ │ │ │ └── adapters/
│ │ │ │ │ └── CommandListRecyclerViewAdapter.java
│ │ │ │ └── utils/
│ │ │ │ └── AES.java
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ ├── circle_shape.xml
│ │ │ │ ├── ic_command_failed.xml
│ │ │ │ ├── ic_command_success.xml
│ │ │ │ ├── ic_full_battery.xml
│ │ │ │ ├── ic_full_battery_charging.xml
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── ic_low_battery.xml
│ │ │ │ ├── ic_low_battery_charging.xml
│ │ │ │ ├── ic_mic_listening.xml
│ │ │ │ ├── ic_phone_connected.xml
│ │ │ │ ├── ic_phone_disconnected.xml
│ │ │ │ ├── ic_wifi_off.xml
│ │ │ │ ├── ic_wifi_on.xml
│ │ │ │ ├── selector_image_gridview.xml
│ │ │ │ └── wis_launcher_background.xml
│ │ │ ├── drawable-v24/
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── layout/
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── blank_screen.xml
│ │ │ │ ├── command_list_recyclerview_item.xml
│ │ │ │ ├── command_post_fragment.xml
│ │ │ │ ├── command_resolve_fragment.xml
│ │ │ │ ├── convo_mode_fragment.xml
│ │ │ │ ├── home_prompt_fragment.xml
│ │ │ │ ├── image_gridview.xml
│ │ │ │ ├── live_life_caption_text.xml
│ │ │ │ ├── object_translate_mode_view.xml
│ │ │ │ ├── old_main.xml
│ │ │ │ ├── reference_card.xml
│ │ │ │ ├── required_args_fragment.xml
│ │ │ │ ├── social_intelligence_activity.xml
│ │ │ │ ├── text_block.xml
│ │ │ │ ├── text_list.xml
│ │ │ │ ├── text_wall_card.xml
│ │ │ │ ├── translate_mode_view.xml
│ │ │ │ ├── viewfinder.xml
│ │ │ │ ├── wake_word_post_fragment.xml
│ │ │ │ └── wearable_face_recognizer.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ ├── wis_launcher.xml
│ │ │ │ └── wis_launcher_round.xml
│ │ │ ├── navigation/
│ │ │ │ └── nav_graph.xml
│ │ │ ├── values/
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimensions.xml
│ │ │ │ ├── key.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── themes.xml
│ │ │ └── values-night/
│ │ │ └── themes.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── example/
│ │ └── wearableintelligencesystemandroidsmartglasses/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── example_smart_glasses_app/
├── .gitignore
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── teamopensmartglasses/
│ │ └── example_smart_glasses_app/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── teamopensmartglasses/
│ │ │ └── example_smart_glasses_app/
│ │ │ ├── MainActivity.java
│ │ │ ├── SmartGlassesService.java
│ │ │ └── ui/
│ │ │ ├── ConnectingToSmartGlassesUi.java
│ │ │ ├── GlassesConnectedFragment.java
│ │ │ ├── SelectSmartGlassesUi.java
│ │ │ ├── SettingsUi.java
│ │ │ ├── SmartGlassesListAdapter.java
│ │ │ └── UiUtils.java
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── outline_device_hub_24.xml
│ │ │ ├── outline_groups_24.xml
│ │ │ ├── outline_memory_24.xml
│ │ │ ├── outline_settings_24.xml
│ │ │ ├── pretty_thin_border.xml
│ │ │ ├── rounded_corner.xml
│ │ │ ├── rounded_corners_bg.xml
│ │ │ ├── rounded_shadow_bg.xml
│ │ │ ├── sgm_launcher_background.xml
│ │ │ ├── textview_background.xml
│ │ │ ├── wis_launcher_background.xml
│ │ │ └── wis_launcher_transparent_background.xml
│ │ ├── drawable-v24/
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── layout/
│ │ │ ├── activity_main.xml
│ │ │ ├── all_transcripts_fragment.xml
│ │ │ ├── api_key_message.xml
│ │ │ ├── connecting_to_glasses_fragment.xml
│ │ │ ├── default_app_dialog.xml
│ │ │ ├── export_data_fragment.xml
│ │ │ ├── glasses_connected_fragment.xml
│ │ │ ├── image_item.xml
│ │ │ ├── main_ui_fragment.xml
│ │ │ ├── menu_item_exposed_dropdown.xml
│ │ │ ├── phrase_context_fragment.xml
│ │ │ ├── phrase_recyclerview_item.xml
│ │ │ ├── reference_card_recyclerview_item.xml
│ │ │ ├── response_text_box.xml
│ │ │ ├── select_glasses_fragment.xml
│ │ │ ├── settings_fragment.xml
│ │ │ ├── smart_glasses_debug_fragment.xml
│ │ │ └── smart_glasses_list_item.xml
│ │ ├── menu/
│ │ │ ├── bottom_nav_main_menu.xml
│ │ │ └── memory_cache_menu.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── navigation/
│ │ │ └── nav_graph.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── xml/
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test/
│ └── java/
│ └── com/
│ └── teamopensmartglasses/
│ └── example_smart_glasses_app/
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
SYMBOL INDEX (1612 symbols across 157 files)
FILE: SGM_android/SmartGlassesManager/src/androidTest/java/com/teamopensmartglasses/smartglassesmanager/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 18) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 20) | @Test
FILE: SGM_android/SmartGlassesManager/src/main/cpp/jni/ogg_opus_encoder.cc
function OggOpusEncoder (line 27) | OggOpusEncoder* GetInstanceOrDie(jlong ptr) {
function VerifyInitialized (line 32) | bool VerifyInitialized(const std::string& function_name, jlong instance_...
function JNIEXPORT (line 46) | JNIEXPORT jbyteArray convertToByteArray(const std::vector<unsigned char>...
function JNIEXPORT (line 56) | JNIEXPORT jlong JNICALL JNI_METHOD(init)(JNIEnv* env, jobject instance,
function JNIEXPORT (line 67) | JNIEXPORT jbyteArray JNICALL
function JNIEXPORT (line 88) | JNIEXPORT jbyteArray JNICALL JNI_METHOD(flush)(JNIEnv* env, jobject inst...
function JNIEXPORT (line 93) | JNIEXPORT void JNICALL JNI_METHOD(free)(JNIEnv* env, jobject instance,
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/config_types.h
type ogg_int16_t (line 19) | typedef int16_t ogg_int16_t;
type ogg_uint16_t (line 20) | typedef uint16_t ogg_uint16_t;
type ogg_int32_t (line 21) | typedef int32_t ogg_int32_t;
type ogg_uint32_t (line 22) | typedef uint32_t ogg_uint32_t;
type ogg_int64_t (line 23) | typedef int64_t ogg_int64_t;
type ogg_uint64_t (line 24) | typedef uint64_t ogg_uint64_t;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/ogg.h
type ogg_iovec_t (line 26) | typedef struct {
type oggpack_buffer (line 31) | typedef struct {
type ogg_page (line 42) | typedef struct {
type ogg_stream_state (line 52) | typedef struct {
type ogg_packet (line 89) | typedef struct {
type ogg_sync_state (line 104) | typedef struct {
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libogg/os_types.h
type ogg_int16_t (line 30) | typedef int16_t ogg_int16_t;
type ogg_uint16_t (line 31) | typedef uint16_t ogg_uint16_t;
type ogg_int32_t (line 32) | typedef int32_t ogg_int32_t;
type ogg_uint32_t (line 33) | typedef uint32_t ogg_uint32_t;
type ogg_int64_t (line 34) | typedef int64_t ogg_int64_t;
type ogg_uint64_t (line 35) | typedef uint64_t ogg_uint64_t;
type ogg_int16_t (line 38) | typedef short ogg_int16_t;
type ogg_uint16_t (line 39) | typedef unsigned short ogg_uint16_t;
type ogg_int32_t (line 40) | typedef int ogg_int32_t;
type ogg_uint32_t (line 41) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 42) | typedef long long ogg_int64_t;
type ogg_uint64_t (line 43) | typedef unsigned long long ogg_uint64_t;
type ogg_int64_t (line 45) | typedef long long ogg_int64_t;
type ogg_uint64_t (line 46) | typedef unsigned long long ogg_uint64_t;
type ogg_int32_t (line 47) | typedef int ogg_int32_t;
type ogg_uint32_t (line 48) | typedef unsigned int ogg_uint32_t;
type ogg_int16_t (line 49) | typedef short ogg_int16_t;
type ogg_uint16_t (line 50) | typedef unsigned short ogg_uint16_t;
type ogg_int16_t (line 54) | typedef int16_t ogg_int16_t;
type ogg_uint16_t (line 55) | typedef uint16_t ogg_uint16_t;
type ogg_int32_t (line 56) | typedef int32_t ogg_int32_t;
type ogg_uint32_t (line 57) | typedef uint32_t ogg_uint32_t;
type ogg_int64_t (line 58) | typedef int64_t ogg_int64_t;
type ogg_uint64_t (line 59) | typedef uint64_t ogg_uint64_t;
type __int64 (line 62) | typedef __int64 ogg_int64_t;
type __int32 (line 63) | typedef __int32 ogg_int32_t;
type ogg_uint32_t (line 64) | typedef unsigned __int32 ogg_uint32_t;
type ogg_uint64_t (line 65) | typedef unsigned __int64 ogg_uint64_t;
type __int16 (line 66) | typedef __int16 ogg_int16_t;
type ogg_uint16_t (line 67) | typedef unsigned __int16 ogg_uint16_t;
type ogg_int16_t (line 74) | typedef int16_t ogg_int16_t;
type ogg_uint16_t (line 75) | typedef uint16_t ogg_uint16_t;
type ogg_int32_t (line 76) | typedef int32_t ogg_int32_t;
type ogg_uint32_t (line 77) | typedef uint32_t ogg_uint32_t;
type ogg_int64_t (line 78) | typedef int64_t ogg_int64_t;
type ogg_uint64_t (line 79) | typedef uint64_t ogg_uint64_t;
type ogg_int16_t (line 85) | typedef short ogg_int16_t;
type ogg_uint16_t (line 86) | typedef unsigned short ogg_uint16_t;
type ogg_int32_t (line 87) | typedef int ogg_int32_t;
type ogg_uint32_t (line 88) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 89) | typedef long long ogg_int64_t;
type ogg_uint64_t (line 90) | typedef unsigned long long ogg_uint64_t;
type ogg_int16_t (line 96) | typedef int16_t ogg_int16_t;
type ogg_uint16_t (line 97) | typedef uint16_t ogg_uint16_t;
type ogg_int32_t (line 98) | typedef int32_t ogg_int32_t;
type ogg_uint32_t (line 99) | typedef uint32_t ogg_uint32_t;
type ogg_int64_t (line 100) | typedef int64_t ogg_int64_t;
type ogg_uint64_t (line 101) | typedef uint64_t ogg_uint64_t;
type ogg_int16_t (line 106) | typedef short ogg_int16_t;
type ogg_uint16_t (line 107) | typedef unsigned short ogg_uint16_t;
type ogg_int32_t (line 108) | typedef int ogg_int32_t;
type ogg_uint32_t (line 109) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 110) | typedef long long ogg_int64_t;
type ogg_uint64_t (line 111) | typedef unsigned long long ogg_uint64_t;
type ogg_int16_t (line 117) | typedef short ogg_int16_t;
type ogg_int32_t (line 118) | typedef int ogg_int32_t;
type ogg_uint32_t (line 119) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 120) | typedef long long ogg_int64_t;
type ogg_uint64_t (line 121) | typedef unsigned long long ogg_uint64_t;
type ogg_int64_t (line 126) | typedef long ogg_int64_t;
type ogg_uint64_t (line 127) | typedef unsigned long ogg_uint64_t;
type ogg_int32_t (line 128) | typedef int ogg_int32_t;
type ogg_uint32_t (line 129) | typedef unsigned ogg_uint32_t;
type ogg_int16_t (line 130) | typedef short ogg_int16_t;
type ogg_int16_t (line 135) | typedef signed short ogg_int16_t;
type ogg_uint16_t (line 136) | typedef unsigned short ogg_uint16_t;
type ogg_int32_t (line 137) | typedef signed int ogg_int32_t;
type ogg_uint32_t (line 138) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 139) | typedef long long int ogg_int64_t;
type ogg_uint64_t (line 140) | typedef unsigned long long int ogg_uint64_t;
type ogg_int16_t (line 145) | typedef signed short ogg_int16_t;
type ogg_uint16_t (line 146) | typedef unsigned short ogg_uint16_t;
type ogg_int32_t (line 147) | typedef signed int ogg_int32_t;
type ogg_uint32_t (line 148) | typedef unsigned int ogg_uint32_t;
type ogg_int64_t (line 149) | typedef long long int ogg_int64_t;
type ogg_uint64_t (line 150) | typedef unsigned long long int ogg_uint64_t;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus.h
type OpusEncoder (line 164) | typedef struct OpusEncoder OpusEncoder;
type OpusDecoder (line 399) | typedef struct OpusDecoder OpusDecoder;
type OpusRepacketizer (line 754) | typedef struct OpusRepacketizer OpusRepacketizer;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_custom.h
type OpusCustomEncoder (line 95) | typedef struct OpusCustomEncoder OpusCustomEncoder;
type OpusCustomDecoder (line 102) | typedef struct OpusCustomDecoder OpusCustomDecoder;
type OpusCustomMode (line 110) | typedef struct OpusCustomMode OpusCustomMode;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_multistream.h
type OpusMSEncoder (line 175) | typedef struct OpusMSEncoder OpusMSEncoder;
type OpusMSDecoder (line 183) | typedef struct OpusMSDecoder OpusMSDecoder;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_projection.h
type OpusProjectionEncoder (line 100) | typedef struct OpusProjectionEncoder OpusProjectionEncoder;
type OpusProjectionDecoder (line 109) | typedef struct OpusProjectionDecoder OpusProjectionDecoder;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_types.h
type opus_int8 (line 51) | typedef int8_t opus_int8;
type opus_uint8 (line 52) | typedef uint8_t opus_uint8;
type opus_int16 (line 53) | typedef int16_t opus_int16;
type opus_uint16 (line 54) | typedef uint16_t opus_uint16;
type opus_int32 (line 55) | typedef int32_t opus_int32;
type opus_uint32 (line 56) | typedef uint32_t opus_uint32;
type opus_int64 (line 57) | typedef int64_t opus_int64;
type opus_uint64 (line 58) | typedef uint64_t opus_uint64;
type _G_int32_t (line 63) | typedef _G_int32_t opus_int32;
type _G_uint32_t (line 64) | typedef _G_uint32_t opus_uint32;
type _G_int16 (line 65) | typedef _G_int16 opus_int16;
type _G_uint16 (line 66) | typedef _G_uint16 opus_uint16;
type opus_int16 (line 68) | typedef short opus_int16;
type opus_uint16 (line 69) | typedef unsigned short opus_uint16;
type opus_int32 (line 70) | typedef int opus_int32;
type opus_uint32 (line 71) | typedef unsigned int opus_uint32;
type opus_int32 (line 73) | typedef int opus_int32;
type opus_uint32 (line 74) | typedef unsigned int opus_uint32;
type opus_int16 (line 75) | typedef short opus_int16;
type opus_uint16 (line 76) | typedef unsigned short opus_uint16;
type __int32 (line 79) | typedef __int32 opus_int32;
type opus_uint32 (line 80) | typedef unsigned __int32 opus_uint32;
type __int16 (line 81) | typedef __int16 opus_int16;
type opus_uint16 (line 82) | typedef unsigned __int16 opus_uint16;
type SInt16 (line 88) | typedef SInt16 opus_int16;
type UInt16 (line 89) | typedef UInt16 opus_uint16;
type SInt32 (line 90) | typedef SInt32 opus_int32;
type UInt32 (line 91) | typedef UInt32 opus_uint32;
type opus_int16 (line 96) | typedef int16_t opus_int16;
type u_int16_t (line 97) | typedef u_int16_t opus_uint16;
type opus_int32 (line 98) | typedef int32_t opus_int32;
type u_int32_t (line 99) | typedef u_int32_t opus_uint32;
type int16 (line 105) | typedef int16 opus_int16;
type u_int16 (line 106) | typedef u_int16 opus_uint16;
type opus_int32 (line 107) | typedef int32_t opus_int32;
type u_int32_t (line 108) | typedef u_int32_t opus_uint32;
type opus_int16 (line 113) | typedef short opus_int16;
type opus_uint16 (line 114) | typedef unsigned short opus_uint16;
type opus_int32 (line 115) | typedef int opus_int32;
type opus_uint32 (line 116) | typedef unsigned int opus_uint32;
type opus_int16 (line 121) | typedef short opus_int16;
type opus_uint16 (line 122) | typedef unsigned short opus_uint16;
type opus_int32 (line 123) | typedef int opus_int32;
type opus_uint32 (line 124) | typedef unsigned int opus_uint32;
type opus_int32 (line 129) | typedef int opus_int32;
type opus_uint32 (line 130) | typedef unsigned opus_uint32;
type opus_int16 (line 131) | typedef short opus_int16;
type opus_uint16 (line 132) | typedef unsigned short opus_uint16;
type opus_int16 (line 137) | typedef signed short opus_int16;
type opus_uint16 (line 138) | typedef unsigned short opus_uint16;
type opus_int32 (line 139) | typedef signed int opus_int32;
type opus_uint32 (line 140) | typedef unsigned int opus_uint32;
type opus_int16 (line 144) | typedef short opus_int16;
type opus_uint16 (line 145) | typedef unsigned short opus_uint16;
type opus_int32 (line 146) | typedef long opus_int32;
type opus_uint32 (line 147) | typedef unsigned long opus_uint32;
type opus_int16 (line 151) | typedef short opus_int16;
type opus_uint16 (line 152) | typedef unsigned short opus_uint16;
type opus_int32 (line 153) | typedef int opus_int32;
type opus_uint32 (line 154) | typedef unsigned int opus_uint32;
type opus_int16 (line 159) | typedef short opus_int16;
type opus_uint16 (line 160) | typedef unsigned short opus_uint16;
type opus_int32 (line 161) | typedef int opus_int32;
type opus_uint32 (line 162) | typedef unsigned int opus_uint32;
FILE: SGM_android/SmartGlassesManager/src/main/cpp/ogg_opus_encoder.cc
type audio_util (line 31) | namespace audio_util {
function SerializeUint32 (line 36) | std::string SerializeUint32(uint32_t value) {
FILE: SGM_android/SmartGlassesManager/src/main/cpp/ogg_opus_encoder.h
function namespace (line 27) | namespace audio_util {
FILE: SGM_android/SmartGlassesManager/src/main/cpp/opus_tools/opus_header.h
type OpusHeader (line 37) | typedef struct {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/SmartGlassesAndroidService.java
class SmartGlassesAndroidService (line 65) | public abstract class SmartGlassesAndroidService extends LifecycleService {
method SmartGlassesAndroidService (line 94) | public SmartGlassesAndroidService(Class mainActivityClass, String myCh...
method onCreate (line 103) | @Override
method setupEventBusSubscribers (line 132) | protected void setupEventBusSubscribers() {
method handleConnectionEvent (line 141) | @Subscribe
method onGlassesConnected (line 146) | protected abstract void onGlassesConnected(SmartGlassesDevice device);
method connectToSmartGlasses (line 148) | public void connectToSmartGlasses(SmartGlassesDevice device) {
method onDestroy (line 161) | @Override
method sendTestCard (line 194) | public void sendTestCard(String title, String body, String img) {
method getSmartGlassesConnectState (line 199) | public int getSmartGlassesConnectState() {
method getConnectedSmartGlasses (line 207) | public SmartGlassesDevice getConnectedSmartGlasses() {
method getConnectedDeviceModelOs (line 213) | public SmartGlassesOperatingSystem getConnectedDeviceModelOs(){
method sendUiUpdate (line 219) | public void sendUiUpdate() {
method saveChosenAsrFramework (line 243) | public static void saveChosenAsrFramework(Context context, ASR_FRAMEWO...
method getChosenAsrFramework (line 251) | public static ASR_FRAMEWORKS getChosenAsrFramework(Context context) {
method changeChosenAsrFramework (line 260) | public void changeChosenAsrFramework(ASR_FRAMEWORKS asrFramework){
method getApiKey (line 268) | public static String getApiKey(Context context) {
method saveApiKey (line 273) | public static void saveApiKey(Context context, String key) {
method getPreferredWearable (line 281) | public static String getPreferredWearable(Context context) {
method savePreferredWearable (line 286) | public static void savePreferredWearable(Context context, String weara...
method saveChosenTranscribeLanguage (line 293) | public static void saveChosenTranscribeLanguage(Context context, Strin...
method getChosenTranscribeLanguage (line 300) | public static String getChosenTranscribeLanguage(Context context) {
method saveChosenTargetLanguage (line 309) | public static void saveChosenTargetLanguage(Context context, String ta...
method getChosenTargetLanguage (line 316) | public static String getChosenTargetLanguage(Context context) {
method saveChosenSourceLanguage (line 325) | public static void saveChosenSourceLanguage(Context context, String so...
method getChosenSourceLanguage (line 332) | public static String getChosenSourceLanguage(Context context) {
method saveSelectedLiveCaptionsTranslationChecked (line 341) | public static void saveSelectedLiveCaptionsTranslationChecked(Context ...
method getSelectedLiveCaptionsTranslation (line 348) | public static int getSelectedLiveCaptionsTranslation(Context context) {
method switchRunningTranscribeLanguage (line 353) | public void switchRunningTranscribeLanguage(String language){
method updateNotification (line 376) | private Notification updateNotification() {
class LocalBinder (line 404) | public class LocalBinder extends Binder {
method getService (line 405) | public SmartGlassesAndroidService getService() {
method onBind (line 411) | @Override
method onStartCommand (line 417) | @Override
method run (line 444) | @Override
method aioConnectSmartGlasses (line 474) | public void aioConnectSmartGlasses(){
method showNoGoogleAsrDialog (line 501) | public void showNoGoogleAsrDialog(){
method sendReferenceCard (line 513) | public static void sendReferenceCard(String title, String body) {
method sendTextWall (line 518) | public static void sendTextWall(String text) {
method sendDoubleTextWall (line 523) | public static void sendDoubleTextWall(String textTop, String textBotto...
method sendRowsCard (line 528) | public static void sendRowsCard(String[] rowStrings) {
method sendBulletPointList (line 533) | public void sendBulletPointList(String title, String [] bullets) {
method sendBulletPointList (line 538) | public void sendBulletPointList(String[] rowStrings) {
method sendReferenceCard (line 542) | public void sendReferenceCard(String title, String body, String imgUrl) {
method sendBitmap (line 546) | public void sendBitmap(Bitmap bitmap) {
method startScrollingText (line 550) | public void startScrollingText(String title){
method pushScrollingText (line 554) | public void pushScrollingText(String text){
method stopScrollingText (line 558) | public void stopScrollingText(){
method sendTextLine (line 562) | public void sendTextLine(String text) {
method sendTextToSpeech (line 566) | public void sendTextToSpeech(String text, String languageString) {
method sendCenteredText (line 570) | public void sendCenteredText(String text){
method sendCustomContent (line 574) | public void sendCustomContent(String json){
method sendHomeScreen (line 578) | public void sendHomeScreen(){
method setFontSize (line 582) | public void setFontSize(SmartGlassesFontSize fontSize) { EventBus.getD...
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/SmartGlassesRepresentative.java
class SmartGlassesRepresentative (line 48) | class SmartGlassesRepresentative {
method SmartGlassesRepresentative (line 69) | SmartGlassesRepresentative(Context context, SmartGlassesDevice smartGl...
method connectToSmartGlasses (line 84) | public void connectToSmartGlasses(){
method onDisableBleScoEvent (line 114) | @Subscribe
method restartAudioWithNoBleSco (line 120) | public void restartAudioWithNoBleSco(){
method connectAndStreamLocalMicrophone (line 130) | private void connectAndStreamLocalMicrophone(boolean useBluetoothSco){
method receiveChunk (line 146) | private void receiveChunk(ByteBuffer chunk){
method destroy (line 152) | public void destroy(){
method getConnectionState (line 170) | public int getConnectionState(){
method showReferenceCard (line 178) | public void showReferenceCard(String title, String body){
method showRowsCard (line 184) | public void showRowsCard(String[] rowStrings){
method startScrollingTextViewModeTest (line 190) | public void startScrollingTextViewModeTest(){
method homeUiAfterDelay (line 204) | private void homeUiAfterDelay(long delayTime){
method homeScreen (line 213) | public void homeScreen(){
method onHomeScreenEvent (line 219) | @Subscribe
method onTextWallViewEvent (line 224) | @Subscribe
method onDoubleTextWallViewEvent (line 231) | @Subscribe
method onReferenceCardSimpleViewEvent (line 238) | @Subscribe
method onRowsCardViewEvent (line 247) | @Subscribe
method onBulletPointListViewEvent (line 255) | @Subscribe
method onReferenceCardImageViewEvent (line 263) | @Subscribe
method onSendBitmapViewRequestEvent (line 272) | @Subscribe
method onDisplayCustomContentRequestEvent (line 280) | @Subscribe
method onTextLineViewRequestEvent (line 288) | @Subscribe
method onDisplayCenteredTextRequestEvent (line 296) | @Subscribe
method onStartScrollingTextViewEvent (line 303) | @Subscribe
method onStopScrollingTextViewEvent (line 310) | @Subscribe
method onFinalScrollingTextEvent (line 317) | @Subscribe
method onIntermediateScrollingTextEvent (line 325) | @Subscribe
method onPromptViewRequestEvent (line 332) | @Subscribe
method onSetFontSizeEvent (line 340) | @Subscribe
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/AspWebsocketServer.java
class AspWebsocketServer (line 20) | public class AspWebsocketServer extends WebSocketServer {
method AspWebsocketServer (line 32) | public AspWebsocketServer(int port)
method AspWebsocketServer (line 38) | public AspWebsocketServer(InetSocketAddress address)
method onOpen (line 43) | @Override
method onClose (line 52) | @Override
method onMessage (line 68) | @Override
method onMessage (line 80) | @Override
method onError (line 85) | @Override
method onStart (line 94) | @Override
method sendJson (line 103) | public void sendJson(JSONObject data){
method setObservable (line 118) | public void setObservable(PublishSubject<JSONObject> observable){
method handleDataStream (line 125) | private void handleDataStream(JSONObject data){
method destroy (line 174) | public void destroy(){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/AudioSystem.java
class AudioSystem (line 39) | public class AudioSystem {
method AudioSystem (line 84) | public AudioSystem(Context context, PublishSubject<JSONObject> dataObs...
method startAudio (line 98) | public void startAudio(){
method startSocket (line 106) | public void startSocket(){
method heartBeat (line 153) | private void heartBeat(){
method restartSocket (line 197) | private void restartSocket(){
method killSocket (line 220) | private void killSocket(){
class SocketThread (line 283) | class SocketThread implements Runnable {
method run (line 284) | @Override
method sendBytes (line 333) | public void sendBytes(byte[] id, byte [] data){
class SendThread (line 372) | class SendThread implements Runnable {
method SendThread (line 373) | SendThread() {
method run (line 375) | @Override
class ReceiveThread (line 404) | private class ReceiveThread implements Runnable {
method run (line 405) | @Override
method my_int_to_bb_be (line 429) | public byte[] my_int_to_bb_be(int myInteger){
method throwBrokenSocket (line 434) | private void throwBrokenSocket(){
method decryptBytes (line 440) | public byte [] decryptBytes(byte [] input) {
method destroy (line 445) | public void destroy(){
method handleDataStream (line 451) | private void handleDataStream(JSONObject data){
method handleEncryptedData (line 467) | private void handleEncryptedData(JSONObject data){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/MessageTypes.java
class MessageTypes (line 3) | public class MessageTypes {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/VolleyCallback.java
type VolleyCallback (line 5) | public interface VolleyCallback {
method onSuccess (line 6) | void onSuccess(JSONObject result);
method onFailure (line 7) | void onFailure();
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/AudioChunkNewEvent.java
class AudioChunkNewEvent (line 3) | public class AudioChunkNewEvent {
method AudioChunkNewEvent (line 6) | public AudioChunkNewEvent(byte [] thisChunk){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/DisableBleScoAudioEvent.java
class DisableBleScoAudioEvent (line 3) | public class DisableBleScoAudioEvent {
method DisableBleScoAudioEvent (line 6) | public DisableBleScoAudioEvent(boolean disableBleScoAudio){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/GoogleAudioChunkNewEvent.java
class GoogleAudioChunkNewEvent (line 3) | public class GoogleAudioChunkNewEvent {
method GoogleAudioChunkNewEvent (line 6) | public GoogleAudioChunkNewEvent(byte [] thisChunk){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/PauseAsrEvent.java
class PauseAsrEvent (line 3) | public class PauseAsrEvent {
method PauseAsrEvent (line 6) | public PauseAsrEvent(boolean pauseAsr){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/PostGenericGlobalMessageEvent.java
class PostGenericGlobalMessageEvent (line 3) | public class PostGenericGlobalMessageEvent {
method PostGenericGlobalMessageEvent (line 6) | public PostGenericGlobalMessageEvent(String newMessage){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/ScoStartEvent.java
class ScoStartEvent (line 3) | public class ScoStartEvent {
method ScoStartEvent (line 6) | public ScoStartEvent(boolean scoStart){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SetFontSizeEvent.java
class SetFontSizeEvent (line 5) | public class SetFontSizeEvent {
method SetFontSizeEvent (line 9) | public SetFontSizeEvent(SmartGlassesFontSize newFontSize){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SmartGlassesConnectedEvent.java
class SmartGlassesConnectedEvent (line 5) | public class SmartGlassesConnectedEvent {
method SmartGlassesConnectedEvent (line 8) | public SmartGlassesConnectedEvent(SmartGlassesDevice newDevice) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SmartGlassesConnectionEvent.java
class SmartGlassesConnectionEvent (line 3) | public class SmartGlassesConnectionEvent {
method SmartGlassesConnectionEvent (line 6) | public SmartGlassesConnectionEvent(int connectionStatus) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/TextToSpeechEvent.java
class TextToSpeechEvent (line 3) | public class TextToSpeechEvent {
method TextToSpeechEvent (line 7) | public TextToSpeechEvent(String text, String language){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/VoskAudioChunkNewEvent.java
class VoskAudioChunkNewEvent (line 3) | public class VoskAudioChunkNewEvent {
method VoskAudioChunkNewEvent (line 6) | public VoskAudioChunkNewEvent(byte [] thisChunk){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/AudioChunkCallback.java
type AudioChunkCallback (line 5) | public interface AudioChunkCallback{
method onSuccess (line 6) | void onSuccess(ByteBuffer chunk);
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/HearItBleMicrophone.java
class HearItBleMicrophone (line 19) | public class HearItBleMicrophone {
type HearItBleMicCallback (line 43) | public interface HearItBleMicCallback {
method onConnected (line 44) | void onConnected();
method onPcmDataAvailable (line 45) | void onPcmDataAvailable(byte[] pcmData);
method setHearItBleMicCallback (line 50) | public void setHearItBleMicCallback(HearItBleMicCallback hearItBleMicC...
method isConnected (line 54) | public boolean isConnected(){
method HearItBleMicrophone (line 58) | public HearItBleMicrophone(Context context) {
method startScanning (line 63) | public void startScanning() {
method onLeScan (line 72) | @Override
method connectToDevice (line 82) | private void connectToDevice(BluetoothDevice device) {
method onConnectionStateChange (line 91) | @Override
method onServicesDiscovered (line 102) | @Override
method onCharacteristicChanged (line 121) | @Override
method adpcmToPcm (line 136) | private void adpcmToPcm(byte[] adpcmData, ByteBuffer pcmDataBuffer) {
method destroy (line 182) | public void destroy() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/MicrophoneLocalAndBluetooth.java
class MicrophoneLocalAndBluetooth (line 26) | public class MicrophoneLocalAndBluetooth {
method onReceive (line 49) | @Override
method handleBluetoothStateChange (line 82) | private void handleBluetoothStateChange(BluetoothState state) {
method handleNewBluetoothDevice (line 90) | private void handleNewBluetoothDevice() {
method handleDisconnectBluetoothDevice (line 96) | private void handleDisconnectBluetoothDevice() {
method MicrophoneLocalAndBluetooth (line 119) | public MicrophoneLocalAndBluetooth(Context context, boolean useBluetoo...
method MicrophoneLocalAndBluetooth (line 125) | public MicrophoneLocalAndBluetooth(Context context, AudioChunkCallback...
method useBluetoothMic (line 141) | private void useBluetoothMic(boolean shouldUseBluetoothSco) {
method startBluetoothSco (line 155) | private void startBluetoothSco() {
method stopBluetoothSco (line 167) | private void stopBluetoothSco() {
method startRecording (line 177) | private void startRecording() {
method stopAndroidMics (line 220) | private void stopAndroidMics(){
method stopRecording (line 229) | private void stopRecording() {
method activateBluetoothSco (line 244) | private void activateBluetoothSco() {
method deactivateBluetoothSco (line 258) | private void deactivateBluetoothSco() {
method bluetoothStateChanged (line 262) | private void bluetoothStateChanged(BluetoothState state) {
class RecordingRunnable (line 276) | private class RecordingRunnable implements Runnable {
method run (line 277) | @Override
method getBufferReadFailureReason (line 296) | private String getBufferReadFailureReason(int errorCode) {
type BluetoothState (line 312) | enum BluetoothState {
method onTick (line 317) | @SuppressWarnings("synthetic-access")
method onFinish (line 323) | @SuppressWarnings("synthetic-access")
method destroy (line 332) | public void destroy() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/AndroidSGC.java
class AndroidSGC (line 39) | public class AndroidSGC extends SmartGlassesCommunicator {
method displayRowsCard (line 60) | public void displayRowsCard(String[] rowStrings){
method AndroidSGC (line 92) | public AndroidSGC(Context context, PublishSubject<JSONObject> dataObse...
method setFontSizes (line 107) | @Override
method connectToSmartGlasses (line 114) | public void connectToSmartGlasses(){
class SendAdvThread (line 137) | class SendAdvThread extends Thread {
method run (line 138) | public void run() {
method blankScreen (line 144) | public void blankScreen(){
method startAsgWebSocketConnection (line 158) | public void startAsgWebSocketConnection(){
method startSocket (line 170) | public void startSocket(){
method openSocket (line 203) | public void openSocket() {
class SocketThread (line 216) | class SocketThread implements Runnable {
method run (line 217) | @Override
method heartBeat (line 275) | public void heartBeat(){
class ReceiveThread (line 299) | public class ReceiveThread implements Runnable {
method run (line 300) | @Override
method restartSocket (line 379) | public void restartSocket(){
method killSocket (line 400) | public void killSocket(){
method my_int_to_bb_be (line 426) | public byte[] my_int_to_bb_be(int myInteger){
method sendBytes (line 430) | public void sendBytes(byte[] id, byte [] data){
class SendThread (line 469) | class SendThread implements Runnable {
method SendThread (line 470) | SendThread() {
method run (line 472) | @Override
method throwBrokenSocket (line 507) | public void throwBrokenSocket(){
method getConnectionState (line 515) | public int getConnectionState(){
method destroy (line 519) | public void destroy(){
method displayReferenceCardSimple (line 563) | public void displayReferenceCardSimple(String title, String body){
method displayTextWall (line 578) | public void displayTextWall(String text){
method displayDoubleTextWall (line 594) | public void displayDoubleTextWall(String textTop, String textBottom){
method displayReferenceCardImage (line 599) | public void displayReferenceCardImage(String title, String body, Strin...
method displayBitmap (line 615) | @Override
method displayBulletList (line 620) | public void displayBulletList(String title, String [] bullets){
method displayBulletList (line 624) | public void displayBulletList(String title, String [] bullets, int lin...
method stopScrollingTextViewMode (line 628) | public void stopScrollingTextViewMode() {
method startScrollingTextViewMode (line 642) | public void startScrollingTextViewMode(String title){
method scrollingTextViewIntermediateText (line 658) | public void scrollingTextViewIntermediateText(String text){
method scrollingTextViewFinalText (line 673) | public void scrollingTextViewFinalText(String text){
method showHomeScreen (line 687) | public void showHomeScreen(){
method displayPromptView (line 701) | public void displayPromptView(String prompt, String [] options){
method displayTextLine (line 753) | public void displayTextLine(String text){
method displayCenteredText (line 757) | public void displayCenteredText(String text){
method displayCustomContent (line 762) | public void displayCustomContent(String json) {
method showNaturalLanguageCommandScreen (line 767) | public void showNaturalLanguageCommandScreen(String prompt, String nat...
method updateNaturalLanguageCommandScreen (line 781) | public void updateNaturalLanguageCommandScreen(String naturalLanguageA...
method handleImage (line 793) | public void handleImage(byte [] raw_data, long imageTime){
method sendPovImage (line 801) | public void sendPovImage(byte [] img, long imageTime){
method setFontSize (line 806) | public void setFontSize(SmartGlassesFontSize fontSize){}
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/AudioWearableSGC.java
class AudioWearableSGC (line 11) | public class AudioWearableSGC extends SmartGlassesCommunicator {
method AudioWearableSGC (line 18) | public AudioWearableSGC(Context context){
method setFontSizes (line 26) | public void setFontSizes(){
method connectToSmartGlasses (line 29) | public void connectToSmartGlasses(){
method blankScreen (line 33) | public void blankScreen(){
method displayRowsCard (line 36) | public void displayRowsCard(String[] rowStrings){
method destroy (line 40) | public void destroy(){
method displayReferenceCardSimple (line 44) | public void displayReferenceCardSimple(String title, String body){
method displayReferenceCardImage (line 49) | public void displayReferenceCardImage(String title, String body, Strin...
method displayBulletList (line 54) | public void displayBulletList(String title, String [] bullets){
method displayBulletList (line 58) | public void displayBulletList(String title, String [] bullets, int lin...
method displayTextWall (line 62) | public void displayTextWall(String text){}
method displayDoubleTextWall (line 63) | public void displayDoubleTextWall(String textTop, String textBottom){}
method stopScrollingTextViewMode (line 65) | public void stopScrollingTextViewMode() {
method startScrollingTextViewMode (line 68) | public void startScrollingTextViewMode(String title){
method scrollingTextViewIntermediateText (line 71) | public void scrollingTextViewIntermediateText(String text){
method scrollingTextViewFinalText (line 74) | public void scrollingTextViewFinalText(String text){
method showHomeScreen (line 77) | public void showHomeScreen(){
method displayPromptView (line 80) | public void displayPromptView(String prompt, String [] options){
method displayTextLine (line 83) | public void displayTextLine(String text){
method displayBitmap (line 88) | @Override
method displayCenteredText (line 93) | public void displayCenteredText(String text){
method displayCustomContent (line 98) | @Override
method showNaturalLanguageCommandScreen (line 104) | public void showNaturalLanguageCommandScreen(String prompt, String nat...
method updateNaturalLanguageCommandScreen (line 107) | public void updateNaturalLanguageCommandScreen(String naturalLanguageA...
method setFontSize (line 110) | public void setFontSize(SmartGlassesFontSize fontSize){}
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java
class SmartGlassesCommunicator (line 10) | public abstract class SmartGlassesCommunicator {
method connectToSmartGlasses (line 14) | public abstract void connectToSmartGlasses();
method blankScreen (line 15) | public abstract void blankScreen();
method destroy (line 16) | public abstract void destroy();
method displayReferenceCardSimple (line 21) | public abstract void displayReferenceCardSimple(String title, String b...
method displayTextWall (line 24) | public abstract void displayTextWall(String text);
method displayDoubleTextWall (line 25) | public abstract void displayDoubleTextWall(String textTop, String text...
method displayReferenceCardImage (line 27) | public abstract void displayReferenceCardImage(String title, String bo...
method displayBulletList (line 28) | public abstract void displayBulletList(String title, String [] bullets);
method displayRowsCard (line 29) | public abstract void displayRowsCard(String[] rowStrings);
method showNaturalLanguageCommandScreen (line 32) | public abstract void showNaturalLanguageCommandScreen(String prompt, S...
method updateNaturalLanguageCommandScreen (line 33) | public abstract void updateNaturalLanguageCommandScreen(String natural...
method startScrollingTextViewMode (line 36) | public void startScrollingTextViewMode(String title){
method scrollingTextViewIntermediateText (line 40) | public abstract void scrollingTextViewIntermediateText(String text);
method scrollingTextViewFinalText (line 41) | public abstract void scrollingTextViewFinalText(String text);
method stopScrollingTextViewMode (line 42) | public abstract void stopScrollingTextViewMode();
method displayPromptView (line 45) | public abstract void displayPromptView(String title, String [] options);
method displayTextLine (line 48) | public abstract void displayTextLine(String text);
method displayBitmap (line 50) | public abstract void displayBitmap(Bitmap bmp);
method displayCenteredText (line 53) | public abstract void displayCenteredText(String text);
method displayCustomContent (line 55) | public abstract void displayCustomContent(String json);
method showHomeScreen (line 58) | public abstract void showHomeScreen();
method setFontSize (line 60) | public abstract void setFontSize(SmartGlassesFontSize fontSize);
method SmartGlassesCommunicator (line 67) | public SmartGlassesCommunicator(){
method setFontSizes (line 72) | protected abstract void setFontSizes();
method getConnectionState (line 74) | public int getConnectionState(){
method isConnected (line 78) | protected boolean isConnected(){
method connectionEvent (line 82) | public void connectionEvent(int connectState){
method tapEvent (line 90) | public void tapEvent(int num){
method setMode (line 94) | public void setMode(SmartGlassesModes mode){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesFontSize.java
type SmartGlassesFontSize (line 3) | public enum SmartGlassesFontSize {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesModes.java
type SmartGlassesModes (line 3) | public enum SmartGlassesModes {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/TextLineSG.java
class TextLineSG (line 3) | public class TextLineSG {
method TextLineSG (line 7) | public TextLineSG(String text, int fontSize){
method getText (line 12) | public String getText() {
method setText (line 16) | public void setText(String text) {
method getFontSizeCode (line 20) | public int getFontSizeCode() {
method setFontSize (line 24) | public void setFontSize(int fontSize) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/UltraliteLayoutHelper.java
class UltraliteLayoutHelper (line 5) | public class UltraliteLayoutHelper {
method getJsonTag (line 6) | public static String getJsonTag(Layout layout) {
method getCustomJsonTag (line 10) | public static String getCustomJsonTag(String layout) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/UltraliteSGC.java
class UltraliteSGC (line 32) | public class UltraliteSGC extends SmartGlassesCommunicator {
class UltraliteListener (line 67) | public class UltraliteListener implements EventListener{
method onTap (line 68) | @Override
method onDisplayTimeout (line 74) | @Override
method onPowerButtonPress (line 79) | @Override
method UltraliteSGC (line 107) | public UltraliteSGC(Context context, LifecycleOwner lifecycleOwner) {
method onUltraliteConnectedChange (line 142) | private void onUltraliteConnectedChange(boolean isConnected) {
method onUltraliteControlChanged (line 161) | private void onUltraliteControlChanged(boolean isControlledByMe) {
method setFontSizes (line 174) | @Override
method connectToSmartGlasses (line 178) | @Override
method displayTextLine (line 199) | public void displayTextLine(String text){
method displayTextWall (line 204) | public void displayTextWall(String text) {
method cleanText (line 238) | private String cleanText(String input) {
method countNewLines (line 268) | public static int countNewLines(String str) {
method displayDoubleTextWall (line 278) | public void displayDoubleTextWall(String textTop, String textBottom) {
method displayCenteredText (line 315) | public void displayCenteredText(String text){
method displayCustomContent (line 318) | public void displayCustomContent(String json) {
method showNaturalLanguageCommandScreen (line 323) | public void showNaturalLanguageCommandScreen(String prompt, String nat...
method updateNaturalLanguageCommandScreen (line 346) | public void updateNaturalLanguageCommandScreen(String naturalLanguageA...
method blankScreen (line 351) | public void blankScreen(){
method destroy (line 357) | @Override
method showHomeScreen (line 374) | public void showHomeScreen(){
method setupUltraliteCanvas (line 380) | public void setupUltraliteCanvas(){
method changeUltraliteLayout (line 387) | public void changeUltraliteLayout(Layout chosenLayout) {
method startScrollingTextViewMode (line 403) | public void startScrollingTextViewMode(String title){
method addNewlineEveryNWords (line 415) | public String addNewlineEveryNWords(String input, int n) {
method drawTextOnUltralite (line 431) | public void drawTextOnUltralite(String text){
method getBitmapFromDrawable (line 449) | public Bitmap getBitmapFromDrawable(Resources res) {
method displayReferenceCardSimple (line 453) | public void displayReferenceCardSimple(String title, String body){
method setFontSize (line 487) | public void setFontSize(SmartGlassesFontSize fontSize){
method displayReferenceCardSimple (line 511) | public void displayReferenceCardSimple(String titleStr, String bodyStr...
method displayBulletList (line 578) | public void displayBulletList(String title, String [] bullets){
method displayRowsCard (line 582) | public void displayRowsCard(String[] rowStrings){
method displayRowsCard (line 586) | public void displayRowsCard(String[] rowStringList, int lingerTime){
method displayBulletList (line 649) | public void displayBulletList(String title, String [] bulletList, int ...
method homeScreenInNSeconds (line 685) | public void homeScreenInNSeconds(int n){
method displayBitmap (line 701) | public void displayBitmap(Bitmap bmp) {
method displayReferenceCardImage (line 713) | public void displayReferenceCardImage(String title, String body, Strin...
method stopScrollingTextViewMode (line 822) | public void stopScrollingTextViewMode() {
method scrollingTextViewIntermediateText (line 831) | public void scrollingTextViewIntermediateText(String text){
method scrollingTextViewFinalText (line 834) | public void scrollingTextViewFinalText(String text){
method maybeReverseRTLString (line 887) | public static String maybeReverseRTLString(String text) {
method isRTLCharacter (line 910) | private static boolean isRTLCharacter(char c) {
method maybeReverseRTLStringList (line 923) | public String[] maybeReverseRTLStringList(String[] in){
method displayPromptView (line 930) | public void displayPromptView(String prompt, String [] options){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/ASR_FRAMEWORKS.java
type ASR_FRAMEWORKS (line 3) | public enum ASR_FRAMEWORKS {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/SpeechRecFramework.java
class SpeechRecFramework (line 5) | public abstract class SpeechRecFramework {
method start (line 10) | public abstract void start();
method destroy (line 11) | public abstract void destroy();
method ingestAudioChunk (line 12) | public abstract void ingestAudioChunk(byte [] audioChunk);
method pauseAsr (line 14) | public void pauseAsr(boolean pauseAsrFlag){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/SpeechRecSwitchSystem.java
class SpeechRecSwitchSystem (line 16) | public class SpeechRecSwitchSystem {
method SpeechRecSwitchSystem (line 24) | public SpeechRecSwitchSystem(Context mContext) {
method startAsrFramework (line 28) | public void startAsrFramework(ASR_FRAMEWORKS asrFramework) {
method startAsrFramework (line 32) | public void startAsrFramework(ASR_FRAMEWORKS asrFramework, String lang...
method startAsrFramework (line 59) | public void startAsrFramework(ASR_FRAMEWORKS asrFramework, String tran...
method onAudioChunkNewEvent (line 86) | @Subscribe
method onPauseAsrEvent (line 94) | @Subscribe
method destroy (line 100) | public void destroy(){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/azure/AzureAudioInputStream.java
class AzureAudioInputStream (line 9) | public class AzureAudioInputStream extends PullAudioInputStreamCallback {
method AzureAudioInputStream (line 22) | private AzureAudioInputStream() {
method getInstance (line 29) | public static synchronized AzureAudioInputStream getInstance() {
method push (line 36) | public void push(byte[] audioChunk) {
method read (line 40) | @Override
method close (line 77) | @Override
method getFormat (line 82) | public AudioStreamFormat getFormat() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/azure/SpeechRecAzure.java
class SpeechRecAzure (line 23) | public class SpeechRecAzure extends SpeechRecFramework {
method SpeechRecAzure (line 40) | public SpeechRecAzure(Context context, String languageLocale) {
method SpeechRecAzure (line 46) | public SpeechRecAzure(Context context, String currentLanguageLocale, S...
method start (line 53) | @Override
method stopReco (line 63) | private void stopReco() {
method destroy (line 96) | @Override
method ingestAudioChunk (line 102) | @Override
method initializeSpeechRecognizer (line 111) | private void initializeSpeechRecognizer() {
method initializeTranslationRecognizer (line 156) | private void initializeTranslationRecognizer() {
method handleDisconnect (line 210) | private void handleDisconnect() {
method setupPhraseList (line 240) | private void setupPhraseList(SpeechRecognizer speechRecognizer) {
method initLanguageLocale (line 249) | private String initLanguageLocale(String localeString) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/deepgram/SpeechRecDeepgram.java
class SpeechRecDeepgram (line 21) | public class SpeechRecDeepgram extends SpeechRecFramework {
method SpeechRecDeepgram (line 31) | public SpeechRecDeepgram(Context context, String languageLocale) {
method start (line 36) | @Override
method destroy (line 42) | @Override
method ingestAudioChunk (line 50) | @Override
method initializeWebSocket (line 57) | private void initializeWebSocket() {
method parseDeepgramMessage (line 92) | public void parseDeepgramMessage(String jsonString) {
method initLanguageLocaleDefault (line 127) | private void initLanguageLocaleDefault() {
method initLanguageLocale (line 131) | private void initLanguageLocale(String localeString) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/SpeechRecGoogle.java
class SpeechRecGoogle (line 27) | public class SpeechRecGoogle extends SpeechRecFramework {
method SpeechRecGoogle (line 32) | public SpeechRecGoogle(Context mContext) {
method SpeechRecGoogle (line 39) | public SpeechRecGoogle(Context mContext, String languageLocale) {
method ingestAudioChunk (line 51) | @Override
method start (line 56) | @Override
method destroy (line 63) | @Override
method initLanguageLocaleDefault (line 92) | private void initLanguageLocaleDefault() {
method initLanguageLocale (line 97) | private void initLanguageLocale(String localeString) {
method constructRepeatingRecognitionSession (line 131) | private void constructRepeatingRecognitionSession() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/AlwaysSameSpeakerIDLabeler.java
class AlwaysSameSpeakerIDLabeler (line 24) | public class AlwaysSameSpeakerIDLabeler implements SpeakerIDLabeler {
method AlwaysSameSpeakerIDLabeler (line 27) | public AlwaysSameSpeakerIDLabeler(SpeakerIdInfo fixedInfo) {
method setReferenceTimestamp (line 31) | @Override
method getSpeakerIDForTimeInterval (line 34) | @Override
method init (line 39) | @Override
method clearSpeakerIDTimestamps (line 42) | @Override
method reset (line 45) | @Override
method processAudioBytes (line 48) | @Override
method stop (line 51) | @Override
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/AlwaysSpeechPolicy.java
class AlwaysSpeechPolicy (line 19) | public class AlwaysSpeechPolicy implements SpeechDetectionPolicy {
method AlwaysSpeechPolicy (line 20) | public AlwaysSpeechPolicy() {}
method shouldPassAudioToRecognizer (line 22) | @Override
method init (line 27) | @Override
method reset (line 30) | @Override
method processAudioBytes (line 33) | @Override
method stop (line 36) | @Override
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/RepeatingRecognitionSession.java
class RepeatingRecognitionSession (line 94) | public class RepeatingRecognitionSession implements SampleProcessorInter...
type PostHandler (line 116) | public interface PostHandler {
method post (line 117) | void post(RequestForRecognitionThread request);
class TranscriptionResultPublisherReference (line 182) | private static class TranscriptionResultPublisherReference
method TranscriptionResultPublisherReference (line 186) | public TranscriptionResultPublisherReference(
method RepeatingRecognitionSession (line 194) | private RepeatingRecognitionSession(Builder builder) {
method newBuilder (line 212) | public static Builder newBuilder() {
method init (line 217) | @Override
method processAudioBytes (line 236) | @Override
method stop (line 318) | @Override
method reset (line 341) | public void reset() {
method reset (line 345) | private void reset(boolean clearTranscript) {
method resetAndClearTranscript (line 368) | public void resetAndClearTranscript() {
method setModelOptions (line 378) | public void setModelOptions(SpeechRecognitionModelOptions modelOptions) {
method getModelOptions (line 389) | public SpeechRecognitionModelOptions getModelOptions() {
method registerCallback (line 394) | public void registerCallback(
method unregisterCallback (line 408) | public void unregisterCallback(TranscriptionResultUpdatePublisher call...
method handlePostedActions (line 426) | private void handlePostedActions() {
method processError (line 482) | private void processError(Throwable errorCause) {
method resetInternal (line 488) | private void resetInternal() {
method requestCurrentSessionEnd (line 497) | private void requestCurrentSessionEnd() {
method abandonCurrentSession (line 503) | private void abandonCurrentSession() {
method tryToProcessLeftovers (line 512) | private void tryToProcessLeftovers() {
method storeSamplesInLeftovers (line 524) | private void storeSamplesInLeftovers(
method isNetworkReconnectionTimeout (line 545) | private boolean isNetworkReconnectionTimeout() {
method isNetworkAvailable (line 555) | private boolean isNetworkAvailable() {
method processResult (line 565) | protected void processResult(TranscriptionResult result, boolean resul...
method finalizeLeftoverHypothesis (line 578) | private void finalizeLeftoverHypothesis() {
method startReconnectionTimer (line 585) | private void startReconnectionTimer() {
method getReconnectionTimerValue (line 589) | private String getReconnectionTimerValue() {
method stopReconnectionTimer (line 597) | private void stopReconnectionTimer() {
method sendTranscriptResultUpdated (line 605) | private void sendTranscriptResultUpdated(TranscriptionResultUpdatePubl...
method addSpeakerIDLabels (line 636) | TranscriptionResult addSpeakerIDLabels(TranscriptionResult result) {
class Builder (line 667) | public static class Builder {
method Builder (line 685) | private Builder() {}
method build (line 687) | public RepeatingRecognitionSession build() {
method setSampleRateHz (line 694) | public Builder setSampleRateHz(int sampleRateHz) {
method setSpeechSessionFactory (line 699) | public Builder setSpeechSessionFactory(SpeechSessionFactory factory) {
method setSpeechRecognitionModelOptions (line 704) | public Builder setSpeechRecognitionModelOptions(SpeechRecognitionMod...
method setNetworkConnectionChecker (line 709) | public Builder setNetworkConnectionChecker(NetworkConnectionChecker ...
method setTranscriptionResultFormatter (line 714) | public Builder setTranscriptionResultFormatter(SafeTranscriptionResu...
method setSpeechDetectionPolicy (line 719) | public Builder setSpeechDetectionPolicy(SpeechDetectionPolicy speech...
method setSpeakerIDLabeler (line 724) | public Builder setSpeakerIDLabeler(SpeakerIDLabeler diarizer) {
method addTranscriptionResultCallback (line 729) | public Builder addTranscriptionResultCallback(
method setTranscriptionErrorPublisher (line 743) | public Builder setTranscriptionErrorPublisher(TranscriptionErrorPubl...
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/RequestForRecognitionThread.java
class RequestForRecognitionThread (line 28) | public class RequestForRecognitionThread {
type Action (line 37) | public enum Action {
method RequestForRecognitionThread (line 48) | private RequestForRecognitionThread(Builder builder) {
method newBuilder (line 56) | static Builder newBuilder() {
method action (line 60) | Action action() {
method hasSessionID (line 64) | boolean hasSessionID() {
method sessionID (line 69) | int sessionID() {
method requestIsFinal (line 73) | boolean requestIsFinal() {
method result (line 77) | TranscriptionResult result() {
method getErrorCause (line 81) | Throwable getErrorCause() {
class Builder (line 86) | static class Builder {
method Builder (line 93) | private Builder() {}
method setAction (line 96) | public Builder setAction(Action action) {
method setSessionID (line 102) | public Builder setSessionID(int sessionID) {
method setResult (line 110) | public Builder setResult(TranscriptionResult result, boolean request...
method build (line 116) | public RequestForRecognitionThread build() {
method setErrorCause (line 120) | public Builder setErrorCause(Throwable errorCause) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SafeTranscriptionResultFormatter.java
class SafeTranscriptionResultFormatter (line 47) | public class SafeTranscriptionResultFormatter {
class Request (line 61) | private static class Request {
method Request (line 71) | public Request(RequestType type) {
type RequestType (line 82) | private enum RequestType {
method SafeTranscriptionResultFormatter (line 97) | public SafeTranscriptionResultFormatter() {
method SafeTranscriptionResultFormatter (line 101) | public SafeTranscriptionResultFormatter(TranscriptionResultFormatterOp...
method ensureThreadIsRunning (line 105) | private void ensureThreadIsRunning() {
method setOptions (line 115) | public void setOptions(TranscriptionResultFormatterOptions options) {
method reset (line 126) | public void reset() {
method addFinalizedResult (line 135) | public void addFinalizedResult(TranscriptionResult resultSingleUtteran...
method clearCurrentHypothesis (line 147) | public void clearCurrentHypothesis() {
method finalizeCurrentHypothesis (line 157) | public boolean finalizeCurrentHypothesis() {
method setCurrentHypothesis (line 173) | public void setCurrentHypothesis(TranscriptionResult resultSingleUtter...
method getFormattedTranscript (line 185) | public Spanned getFormattedTranscript() {
method getMostRecentTranscriptSegment (line 201) | public Spanned getMostRecentTranscriptSegment() {
method getTranscriptDuration (line 217) | public Duration getTranscriptDuration() {
class TranscriptionResultFormatterService (line 242) | private class TranscriptionResultFormatterService implements Runnable {
method TranscriptionResultFormatterService (line 245) | TranscriptionResultFormatterService() {
method TranscriptionResultFormatterService (line 249) | TranscriptionResultFormatterService(TranscriptionResultFormatterOpti...
method run (line 256) | @Override
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechDetectionPolicy.java
type SpeechDetectionPolicy (line 25) | public interface SpeechDetectionPolicy extends SampleProcessorInterface {
method shouldPassAudioToRecognizer (line 26) | boolean shouldPassAudioToRecognizer();
method reset (line 28) | void reset();
method cueEvidenceOfSpeech (line 38) | default void cueEvidenceOfSpeech() {}
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSession.java
class SpeechSession (line 25) | public abstract class SpeechSession {
method requiresNetworkConnection (line 29) | public abstract boolean requiresNetworkConnection();
method init (line 36) | public void init(
method sessionID (line 46) | public int sessionID() {
method initImpl (line 50) | protected abstract void initImpl(
method isInitialized (line 54) | public final boolean isInitialized() {
method processAudioBytes (line 59) | public boolean processAudioBytes(byte[] buffer, int offset, int count) {
method processAudioBytesImpl (line 66) | protected abstract boolean processAudioBytesImpl(byte[] buffer, int of...
method requestCloseSession (line 76) | public void requestCloseSession() {
method requestCloseSessionImpl (line 83) | protected abstract void requestCloseSessionImpl();
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSessionFactory.java
type SpeechSessionFactory (line 19) | public interface SpeechSessionFactory {
method create (line 20) | SpeechSession create(SpeechSessionListener listener, int sampleRateHz);
method cleanup (line 23) | default void cleanup() {}
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSessionListener.java
type SpeechSessionListener (line 21) | public interface SpeechSessionListener {
method onSessionFatalError (line 26) | void onSessionFatalError(int sessionID, Throwable error);
method onResults (line 32) | void onResults(int sessionID, TranscriptionResult result, boolean resu...
method onDoneListening (line 35) | void onDoneListening(int sessionID);
method onOkToTerminateSession (line 41) | void onOkToTerminateSession(int sessionID);
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TimeUtil.java
class TimeUtil (line 31) | public final class TimeUtil {
method toInstant (line 32) | public static Instant toInstant(Timestamp t) {
method toTimestamp (line 36) | public static Timestamp toTimestamp(Instant t) {
method convert (line 40) | public static Duration convert(com.google.protobuf.Duration d) {
method convert (line 44) | public static com.google.protobuf.Duration convert(Duration d) {
method TimeUtil (line 47) | private TimeUtil() {}
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionErrorPublisher.java
type TranscriptionErrorPublisher (line 19) | public interface TranscriptionErrorPublisher {
method onError (line 21) | void onError(Throwable errorCause);
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultFormatter.java
class TranscriptionResultFormatter (line 48) | public class TranscriptionResultFormatter {
method noFormattingOptions (line 75) | public static TranscriptionResultFormatterOptions noFormattingOptions() {
class CachedResult (line 86) | private static class CachedResult {
method CachedResult (line 91) | CachedResult(TranscriptionResult result, Spanned text, Spanned leadi...
method getFormattedText (line 97) | CharSequence getFormattedText() {
method TranscriptionResultFormatter (line 119) | public TranscriptionResultFormatter() {
method TranscriptionResultFormatter (line 123) | public TranscriptionResultFormatter(TranscriptionResultFormatterOption...
method setOptions (line 132) | public void setOptions(TranscriptionResultFormatterOptions options) {
method createLineBreakString (line 156) | private String createLineBreakString(int lineBreakCount) {
method reset (line 161) | public void reset() {
method addFinalizedResult (line 173) | public void addFinalizedResult(TranscriptionResult resultSingleUtteran...
method clearCurrentHypothesis (line 186) | public void clearCurrentHypothesis() {
method finalizeCurrentHypothesis (line 195) | public boolean finalizeCurrentHypothesis() {
method setCurrentHypothesis (line 209) | public void setCurrentHypothesis(TranscriptionResult resultSingleUtter...
method getFormattedTranscript (line 214) | public Spanned getFormattedTranscript() {
method getMostRecentTranscriptSegment (line 225) | public Spanned getMostRecentTranscriptSegment() {
method getTranscriptDuration (line 241) | public Duration getTranscriptDuration() {
method getFormattedHypothesis (line 250) | private Spannable getFormattedHypothesis() {
method formatHypothesis (line 266) | private Spannable formatHypothesis(TranscriptionResult result, boolean...
type ColorByWordFunction (line 279) | private interface ColorByWordFunction {
method getColor (line 280) | String getColor(TranscriptionResult.Word w);
method formatSingleFinalized (line 287) | private Spannable formatSingleFinalized(
method obtainLineBreaksFromLastFinalizedResult (line 347) | private String obtainLineBreaksFromLastFinalizedResult(TranscriptionRe...
method obtainLineBreaksBetweenTwoResults (line 353) | private String obtainLineBreaksBetweenTwoResults(
method getLineBreaksWhenSilenceAndLanguageSwitch (line 370) | private String getLineBreaksWhenSilenceAndLanguageSwitch() {
method getLanguageWithoutDialect (line 377) | private static String getLanguageWithoutDialect(String languageCode) {
method formatWord (line 388) | private static String formatWord(String languageCode, String word) {
method checkWordExistedThenAdd (line 405) | private static boolean checkWordExistedThenAdd(
method addPerWordColoredStringToResult (line 426) | private Spannable addPerWordColoredStringToResult(
method makeColoredString (line 499) | private SpannableString makeColoredString(String message, String color) {
method getColorFromConfidence (line 514) | private String getColorFromConfidence(TranscriptionResult result) {
method getColorFromConfidence (line 525) | private String getColorFromConfidence(float confidence) {
method getDefaultColorFromTheme (line 537) | private String getDefaultColorFromTheme() {
method getColorFromSpeakerId (line 552) | private String getColorFromSpeakerId(int speakerID) {
method getColorList (line 556) | private static ImmutableList<String> getColorList(TranscriptionResultF...
method newSpeakerChevron (line 567) | private static String newSpeakerChevron(int tag, boolean includesNewli...
method getLastSpeakerIdTag (line 571) | private static int getLastSpeakerIdTag(TranscriptionResult result) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultReceiver.java
class TranscriptionResultReceiver (line 28) | class TranscriptionResultReceiver implements SpeechSessionListener {
method TranscriptionResultReceiver (line 33) | public TranscriptionResultReceiver(RepeatingRecognitionSession.PostHan...
method onSessionFatalError (line 37) | @Override
method onResults (line 51) | @Override
method onDoneListening (line 61) | @Override
method onOkToTerminateSession (line 67) | @Override
method errorIndicatesLossOfConnection (line 73) | private boolean errorIndicatesLossOfConnection(Throwable error) {
method post (line 81) | private void post(int sessionID, RequestForRecognitionThread.Action re...
method post (line 89) | private void post(RequestForRecognitionThread request) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultUpdatePublisher.java
type TranscriptionResultUpdatePublisher (line 21) | public interface TranscriptionResultUpdatePublisher {
type UpdateType (line 23) | enum UpdateType {
type ResultSource (line 30) | enum ResultSource {
method onTranscriptionUpdate (line 43) | void onTranscriptionUpdate(Spanned formattedResult, UpdateType updateT...
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/CircularByteBuffer.java
class CircularByteBuffer (line 28) | public class CircularByteBuffer {
class Reader (line 37) | public static class Reader {
method read (line 57) | public boolean read(byte[] dst, int offset, int numBytes) {
method read (line 65) | public boolean read(byte[] dst) {
method peek (line 73) | public boolean peek(byte[] dst, int offset, int numBytes) {
method peek (line 77) | public boolean peek(byte[] dst) {
method advance (line 81) | public void advance(int advanceBy) {
method availableBytes (line 85) | public int availableBytes() {
method Reader (line 89) | private Reader(CircularByteBuffer owner) {
method reset (line 94) | private void reset() {
method CircularByteBuffer (line 100) | public CircularByteBuffer(int capacity) {
method newReader (line 110) | public Reader newReader() {
method write (line 121) | public synchronized boolean write(byte[] src, int offset, int bytesToW...
method write (line 141) | public boolean write(byte[] src) {
method getCapacity (line 145) | public int getCapacity() {
method reset (line 153) | public synchronized void reset() {
method read (line 168) | private boolean read(Reader reader, byte[] dst, int offset, int numByt...
method peek (line 189) | private boolean peek(Reader reader, byte[] dst, int offset, int numByt...
method getCumulativeWritten (line 209) | public synchronized long getCumulativeWritten() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/NetworkConnectionChecker.java
class NetworkConnectionChecker (line 43) | public class NetworkConnectionChecker {
method onReceive (line 51) | @Override
method NetworkConnectionChecker (line 59) | public NetworkConnectionChecker(Context context) {
method addNetworkStateObserver (line 95) | public void addNetworkStateObserver(LifecycleOwner owner, Observer<Net...
method getNetworkState (line 101) | protected NetworkState getNetworkState() {
method isConnected (line 112) | public boolean isConnected() {
method registerNetworkCallback (line 122) | public void registerNetworkCallback() {
method unregisterNetworkCallback (line 134) | public void unregisterNetworkCallback() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/ResponseTextUiAdapter.java
class ResponseTextUiAdapter (line 15) | public class ResponseTextUiAdapter extends RecyclerView.Adapter<Response...
method ResponseTextUiAdapter (line 18) | public ResponseTextUiAdapter(List<String> data) {
method onCreateViewHolder (line 22) | @NonNull
method onBindViewHolder (line 30) | @Override
method getItemCount (line 36) | @Override
class ViewHolder (line 41) | static class ViewHolder extends RecyclerView.ViewHolder {
method ViewHolder (line 44) | ViewHolder(@NonNull View itemView) {
method addText (line 50) | public void addText(String text) {
method clearTexts (line 55) | public void clearTexts() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/SampleProcessorInterface.java
type SampleProcessorInterface (line 19) | public interface SampleProcessorInterface {
method init (line 20) | public void init(int blockSizeSamples);
method processAudioBytes (line 24) | public void processAudioBytes(byte[] bytes, int offset, int length);
method processAudioBytes (line 26) | public default void processAudioBytes(byte[] bytes) {
method stop (line 34) | public void stop();
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/SpeakerIDLabeler.java
type SpeakerIDLabeler (line 25) | public interface SpeakerIDLabeler extends SampleProcessorInterface {
method setReferenceTimestamp (line 30) | void setReferenceTimestamp(Instant now);
method getSpeakerIDForTimeInterval (line 37) | SpeakerIdInfo getSpeakerIDForTimeInterval(Instant start, Instant end);
method clearSpeakerIDTimestamps (line 44) | void clearSpeakerIDTimestamps();
method reset (line 47) | void reset();
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/StreamingAudioEncoder.java
class StreamingAudioEncoder (line 47) | public class StreamingAudioEncoder {
class EncoderException (line 60) | public static class EncoderException extends Exception {
method EncoderException (line 61) | public EncoderException(String message) {
type CodecType (line 67) | public enum CodecType {
method StreamingAudioEncoder (line 79) | public StreamingAudioEncoder(boolean useDeprecatedEncoder) {
method StreamingAudioEncoder (line 83) | public StreamingAudioEncoder() {
type StreamingAudioInternalEncoder (line 87) | private interface StreamingAudioInternalEncoder {
method init (line 88) | void init(int sampleRateHz, CodecAndBitrate codecAndBitrate, boolean...
method processAudioBytes (line 91) | byte[] processAudioBytes(byte[] input, int offset, int length);
method flushAndStop (line 93) | byte[] flushAndStop();
method init (line 104) | public void init(int sampleRateHz, CodecAndBitrate codecAndBitrate, bo...
method processAudioBytes (line 128) | public byte[] processAudioBytes(byte[] input, int offset, int length) {
method processAudioBytes (line 138) | public byte[] processAudioBytes(byte[] input) {
method flushAndStop (line 143) | public byte[] flushAndStop() {
method isEncoderSupported (line 161) | public static boolean isEncoderSupported(CodecAndBitrate encoderInfo) {
method getCodecType (line 169) | public CodecType getCodecType() {
method getMime (line 173) | private static String getMime(CodecType codecAndBitrate) {
method lookupCodecType (line 187) | private static CodecType lookupCodecType(CodecAndBitrate codecAndBitra...
method searchAmongAndroidSupportedCodecs (line 219) | private static MediaCodecInfo searchAmongAndroidSupportedCodecs(String...
class AndroidSystemEncoder (line 237) | private static class AndroidSystemEncoder implements StreamingAudioInt...
method AndroidSystemEncoder (line 275) | public AndroidSystemEncoder(boolean useDeprecatedEncoder) {
method init (line 281) | @Override
method processAudioBytes (line 307) | @Override
method flushAndStop (line 328) | @Override
method processAudioBytesInternal (line 342) | private void processAudioBytesInternal(
method getMediaFormat (line 413) | private static MediaFormat getMediaFormat(CodecAndBitrate codecAndBi...
method getHeaderBytes (line 428) | private byte[] getHeaderBytes() {
method initBuffers (line 446) | private void initBuffers() {
method getInputBuffer (line 453) | private ByteBuffer getInputBuffer(int index) {
method getOutputBuffer (line 461) | private ByteBuffer getOutputBuffer(int index) {
method updateOutputBuffers (line 469) | private void updateOutputBuffers() {
class OggOpusEncoder (line 476) | private static class OggOpusEncoder implements StreamingAudioInternalE...
method OggOpusEncoder (line 481) | public OggOpusEncoder() {}
method init (line 483) | @Override
method init (line 501) | private native long init(int channels, int bitrate, int sampleRateHz...
method processAudioBytes (line 503) | @Override
method processAudioBytes (line 508) | private native byte[] processAudioBytes(long instance, byte[] sample...
method flushAndStop (line 516) | @Override
method finalize (line 529) | @Override
method flush (line 539) | private native byte[] flush(long instance);
method free (line 540) | private native void free(long instance);
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechSession.java
class CloudSpeechSession (line 50) | public class CloudSpeechSession extends SpeechSession {
method CloudSpeechSession (line 85) | public CloudSpeechSession(
method initImpl (line 98) | @Override
method usingEncoder (line 128) | public boolean usingEncoder() {
method makeResponseObserver (line 132) | private CloudSpeechStreamObserver makeResponseObserver(
method processAudioBytesImpl (line 148) | @Override
method isStillSendingRequests (line 172) | private boolean isStillSendingRequests() {
method requestCloseSessionImpl (line 181) | @Override
method requiresNetworkConnection (line 194) | @Override
method initServer (line 199) | private void initServer(SpeechRecognitionModelOptions modelOptions) {
method streamToServer (line 269) | private void streamToServer(byte[] buffer, int offset, int count) {
method closeServer (line 277) | private void closeServer() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechSessionFactory.java
class CloudSpeechSessionFactory (line 37) | public class CloudSpeechSessionFactory implements SpeechSessionFactory {
method CloudSpeechSessionFactory (line 54) | public CloudSpeechSessionFactory(CloudSpeechSessionParams params, Stri...
method create (line 59) | @Override
method cleanup (line 71) | @Override
method setParams (line 87) | public void setParams(CloudSpeechSessionParams params) {
method ensureManagedChannelConnection (line 93) | protected void ensureManagedChannelConnection() {
method createManagedChannel (line 102) | private ManagedChannel createManagedChannel(String apiKey) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechStreamObserver.java
class CloudSpeechStreamObserver (line 50) | public class CloudSpeechStreamObserver implements StreamObserver<Streami...
method CloudSpeechStreamObserver (line 82) | public CloudSpeechStreamObserver(
method onNext (line 98) | @Override
method onError (line 187) | @Override
method onCompleted (line 194) | @Override
method isStillListening (line 207) | public boolean isStillListening() {
method timeSinceLastServerActivity (line 212) | public Duration timeSinceLastServerActivity() {
method stopListening (line 216) | private void stopListening() {
method updateLastActivityTimestamp (line 223) | private void updateLastActivityTimestamp() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/TimestampCalculator.java
class TimestampCalculator (line 36) | public class TimestampCalculator {
method TimestampCalculator (line 52) | public TimestampCalculator(Instant newSessionStartTime) {
method getFinalizedStartTimestamp (line 56) | public Timestamp getFinalizedStartTimestamp(WordInfo wordInfo) {
method getFinalizedEndTimestamp (line 63) | public Timestamp getFinalizedEndTimestamp(WordInfo wordInfo) {
method reset (line 70) | public void reset() {
method updateUnfinalizedTimestamps (line 74) | public List<TranscriptionResult.Word> updateUnfinalizedTimestamps(
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/vad/VadGateSpeechPolicy.java
class VadGateSpeechPolicy (line 20) | public class VadGateSpeechPolicy implements SpeechDetectionPolicy {
method VadGateSpeechPolicy (line 27) | public VadGateSpeechPolicy(Context context){
method startVad (line 33) | public void startVad(int blockSizeSamples){
method shouldPassAudioToRecognizer (line 66) | @Override
method init (line 71) | @Override
method reset (line 76) | @Override
method bytesToShort (line 79) | public short [] bytesToShort(byte[] bytes) {
method processAudioBytes (line 86) | @Override
method stop (line 111) | @Override
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/vosk/SpeechRecVosk.java
class SpeechRecVosk (line 34) | public class SpeechRecVosk extends SpeechRecFramework implements Recogni...
method SpeechRecVosk (line 70) | public SpeechRecVosk(Context context){
method start (line 101) | @Override
method setupEventBusSubscribers (line 121) | private void setupEventBusSubscribers(){
method initModel (line 125) | private void initModel() {
method setErrorState (line 135) | private void setErrorState(String message) {
method recognizeSpeech (line 139) | private void recognizeSpeech() {
method pause (line 156) | private void pause(boolean checked) {
method destroy (line 162) | public void destroy() {
method handleDataStream (line 171) | private void handleDataStream(JSONObject data){
class VoskAudioBytesStream (line 185) | class VoskAudioBytesStream extends InputStream {
method read (line 188) | public int read() {
method write (line 193) | public void write(byte [] inputData){
method onResult (line 199) | @Override
method handleResult (line 209) | public void handleResult(String hypothesis){
method handleTranscript (line 214) | public void handleTranscript(String hypothesis, String transcriptType,...
method onFinalResult (line 292) | @Override
method onPartialResult (line 299) | @Override
method onError (line 305) | @Override
method onTimeout (line 310) | @Override
method ingestAudioChunk (line 324) | @Override
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/AndroidPhoneTestGlasses.java
class AndroidPhoneTestGlasses (line 4) | public class AndroidPhoneTestGlasses extends SmartGlassesDevice {
method AndroidPhoneTestGlasses (line 5) | public AndroidPhoneTestGlasses() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/AudioWearable.java
class AudioWearable (line 3) | public class AudioWearable extends SmartGlassesDevice {
method AudioWearable (line 4) | public AudioWearable() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/EngoTwo.java
class EngoTwo (line 3) | public class EngoTwo extends SmartGlassesDevice {
method EngoTwo (line 4) | public EngoTwo() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/EvenRealitiesG1.java
class EvenRealitiesG1 (line 3) | public class EvenRealitiesG1 extends SmartGlassesDevice {
method EvenRealitiesG1 (line 4) | public EvenRealitiesG1() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/InmoAirOne.java
class InmoAirOne (line 4) | public class InmoAirOne extends SmartGlassesDevice {
method InmoAirOne (line 5) | public InmoAirOne() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/InmoGo.java
class InmoGo (line 3) | public class InmoGo extends SmartGlassesDevice {
method InmoGo (line 4) | public InmoGo() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/SmartGlassesDevice.java
class SmartGlassesDevice (line 5) | public class SmartGlassesDevice implements Serializable {
method getDeviceModelName (line 21) | public String getDeviceModelName() {
method setDeviceModelName (line 25) | public void setDeviceModelName(String deviceModelName) {
method getDeviceIconName (line 29) | public String getDeviceIconName() {
method setDeviceIconName (line 33) | public void setDeviceIconName(String deviceIconName) {
method getAnySupport (line 37) | public boolean getAnySupport() {
method setAnySupport (line 41) | public void setAnySupport(boolean anySupport) {
method getFullSupport (line 45) | public boolean getFullSupport() {
method setFullSupport (line 49) | public void setFullSupport(boolean fullSupport) {
method getGlassesOs (line 53) | public SmartGlassesOperatingSystem getGlassesOs() {
method setGlassesOs (line 57) | public void setGlassesOs(SmartGlassesOperatingSystem glassesOs) {
method getHasDisplay (line 61) | public boolean getHasDisplay() {
method setHasDisplay (line 65) | public void setHasDisplay(boolean hasDisplay) {
method getHasSpeakers (line 69) | public boolean getHasSpeakers() {
method setHasSpeakers (line 73) | public void setHasSpeakers(boolean hasSpeakers) {
method getHasCamera (line 77) | public boolean getHasCamera() {
method setHasCamera (line 81) | public void setHasCamera(boolean hasCamera) {
method getHasInMic (line 85) | public boolean getHasInMic() {
method setHasInMic (line 89) | public void setHasInMic(boolean hasInMic) {
method getHasOutMic (line 93) | public boolean getHasOutMic() {
method setHasOutMic (line 97) | public void setHasOutMic(boolean hasOutMic) {
method getWeight (line 101) | public double getWeight() {
method setWeight (line 105) | public void setWeight(double weight) {
method getConnectionState (line 109) | public int getConnectionState() {
method setConnectionState (line 113) | public void setConnectionState(int connectionState) {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java
type SmartGlassesOperatingSystem (line 3) | public enum SmartGlassesOperatingSystem {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/TCLRayNeoXTwo.java
class TCLRayNeoXTwo (line 3) | public class TCLRayNeoXTwo extends SmartGlassesDevice {
method TCLRayNeoXTwo (line 4) | public TCLRayNeoXTwo() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/VuzixShield.java
class VuzixShield (line 3) | public class VuzixShield extends SmartGlassesDevice {
method VuzixShield (line 4) | public VuzixShield() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/VuzixUltralite.java
class VuzixUltralite (line 3) | public class VuzixUltralite extends SmartGlassesDevice {
method VuzixUltralite (line 4) | public VuzixUltralite() {
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/texttospeech/TextToSpeechSystem.java
class TextToSpeechSystem (line 21) | public class TextToSpeechSystem {
method TextToSpeechSystem (line 29) | public TextToSpeechSystem(Context context){
method useSco (line 35) | public void useSco(boolean useSco){
method setup (line 40) | public void setup(){
method speak (line 62) | public void speak(String text){
method speak (line 66) | public void speak(String text, Locale locale){
method destroy (line 114) | public void destroy(){
method handleTtsEvent (line 124) | @Subscribe
method handleScoEvent (line 164) | @Subscribe
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/AES.java
class AES (line 15) | public class AES {
method setKey (line 21) | public static void setKey(String myKey)
method encrypt (line 39) | public static String encrypt(String strToEncrypt, String secret)
method encrypt (line 56) | public static byte [] encrypt(byte [ ] bytesToEncrypt, String secret)
method decrypt (line 73) | public static String decrypt(String strToDecrypt, String secret)
method decrypt (line 91) | public static byte [] decrypt(byte [] bytesToDecrypt, String secret)
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/BitmapJavaUtils.java
class BitmapJavaUtils (line 8) | public class BitmapJavaUtils {
method loadImageFromStorage (line 11) | public static Bitmap loadImageFromStorage(String path){
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/NetworkUtils.java
class NetworkUtils (line 28) | public class NetworkUtils {
method sendBroadcast (line 31) | public static void sendBroadcast(String messageStr, DatagramSocket adv...
method getBroadcast (line 63) | public static InetAddress getBroadcast(InetAddress inetAddr) {
method isHotspotOn (line 83) | public static boolean isHotspotOn(Context context){
method getIpAddress (line 110) | public static InetAddress getIpAddress() {
method getHotspotIpAddress (line 140) | public static String getHotspotIpAddress() {
method getBroadcastAddress (line 178) | public static InetAddress getBroadcastAddress(InetAddress inetAddr) {
method getLocalIpAddress (line 202) | public static String getLocalIpAddress(Context context) throws Unknown...
FILE: SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/PermissionsUtils.java
class PermissionsUtils (line 16) | public class PermissionsUtils {
method PermissionsUtils (line 20) | public PermissionsUtils(AppCompatActivity callingActivity, String tag){
method requestFilesPermission (line 36) | public boolean requestFilesPermission() {
method canAccessExternalSd (line 48) | public boolean canAccessExternalSd() {
method hasPermission (line 52) | private boolean hasPermission(String perm) {
method checkPermission (line 57) | public void checkPermission() {
method askForLocationPermission (line 77) | private void askForLocationPermission() {
method askPermissionForBackgroundUsage (line 103) | private void askPermissionForBackgroundUsage() {
method onRequestPermissionsResult (line 129) | public void onRequestPermissionsResult(int requestCode, @NonNull Strin...
method getSomePermissions (line 155) | public void getSomePermissions(){
FILE: SGM_android/SmartGlassesManager/src/test/java/com/teamopensmartglasses/smartglassesmanager/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/arch.h
type spx_int16_t (line 91) | typedef spx_int16_t spx_word16_t;
type spx_int32_t (line 92) | typedef spx_int32_t spx_word32_t;
type spx_word32_t (line 93) | typedef spx_word32_t spx_mem_t;
type spx_word16_t (line 94) | typedef spx_word16_t spx_coef_t;
type spx_word16_t (line 95) | typedef spx_word16_t spx_lsp_t;
type spx_word32_t (line 96) | typedef spx_word32_t spx_sig_t;
type spx_mem_t (line 137) | typedef float spx_mem_t;
type spx_coef_t (line 138) | typedef float spx_coef_t;
type spx_lsp_t (line 139) | typedef float spx_lsp_t;
type spx_sig_t (line 140) | typedef float spx_sig_t;
type spx_word16_t (line 141) | typedef float spx_word16_t;
type spx_word32_t (line 142) | typedef float spx_word32_t;
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/audio-in.c
function input_format (line 101) | input_format *open_audio_file(FILE *in, oe_enc_opt *opt)
function seek_forward (line 145) | static int seek_forward(FILE *in, unsigned int length)
function find_wav_chunk (line 165) | static int find_wav_chunk(FILE *in, char *type, unsigned int *len)
function find_aiff_chunk (line 194) | static int find_aiff_chunk(FILE *in, char *type, unsigned int *len)
function read_IEEE80 (line 229) | double read_IEEE80(unsigned char *buf)
function aiff_id (line 261) | int aiff_id(unsigned char *buf, int len)
function aiff_open (line 287) | int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
function wav_id (line 420) | int wav_id(unsigned char *buf, int len)
function wav_open (line 435) | int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
function wav_read (line 634) | long wav_read(void *in, float *buffer, int samples)
function wav_ieee_read (line 718) | long wav_ieee_read(void *in, float *buffer, int samples)
function wav_close (line 740) | void wav_close(void *info)
function raw_open (line 748) | int raw_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
type scaler (line 779) | typedef struct {
function read_scaler (line 786) | static long read_scaler(void *data, float *buffer, int samples) {
function setup_scaler (line 798) | void setup_scaler(oe_enc_opt *opt, float scale) {
type padder (line 810) | typedef struct {
function read_padder (line 820) | static long read_padder(void *data, float *buffer, int samples) {
function setup_padder (line 850) | void setup_padder(oe_enc_opt *opt,ogg_int64_t *original_samples) {
function clear_padder (line 865) | void clear_padder(oe_enc_opt *opt) {
type resampler (line 875) | typedef struct {
function read_resampled (line 886) | static long read_resampled(void *d, float *buffer, int samples)
function setup_resample (line 915) | int setup_resample(oe_enc_opt *opt, int complexity, long outfreq) {
function clear_resample (line 943) | void clear_resample(oe_enc_opt *opt) {
type downmix (line 955) | typedef struct {
function read_downmix (line 964) | static long read_downmix(void *data, float *buffer, int samples)
function setup_downmix (line 986) | int setup_downmix(oe_enc_opt *opt, int out_channels) {
function clear_downmix (line 1036) | void clear_downmix(oe_enc_opt *opt) {
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/diag_range.c
function parse_size (line 52) | static int parse_size(const unsigned char *data, opus_int32 len, short *...
function opus_packet_parse_impl (line 72) | static int opus_packet_parse_impl(const unsigned char *data, opus_int32 ...
function save_range (line 219) | void save_range(FILE *frange, int frame_size, unsigned char *packet, int...
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/info_opus.c
function packet_get_samples_per_frame (line 46) | static int packet_get_samples_per_frame(const unsigned char *data, ogg_i...
function packet_get_nb_frames (line 67) | static int packet_get_nb_frames(const unsigned char packet[], ogg_int32_...
function info_opus_process (line 88) | void info_opus_process(stream_processor *stream, ogg_page *page )
function info_opus_end (line 257) | void info_opus_end(stream_processor *stream)
function info_opus_start (line 305) | void info_opus_start(stream_processor *stream)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/info_opus.h
type misc_opus_info (line 28) | typedef struct {
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/lpc.c
function vorbis_lpc_from_data (line 58) | float vorbis_lpc_from_data(float *data,float *lpci,int n,int m,int stride){
function vorbis_lpc_predict (line 130) | void vorbis_lpc_predict(float *coeff,float *prime,int m,
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opus_header.c
type Packet (line 60) | typedef struct {
type ROPacket (line 66) | typedef struct {
function write_uint32 (line 72) | static int write_uint32(Packet *p, ogg_uint32_t val)
function write_uint16 (line 84) | static int write_uint16(Packet *p, ogg_uint16_t val)
function write_chars (line 94) | static int write_chars(Packet *p, const unsigned char *str, int nb_chars)
function read_uint32 (line 104) | static int read_uint32(ROPacket *p, ogg_uint32_t *val)
function read_uint16 (line 116) | static int read_uint16(ROPacket *p, ogg_uint16_t *val)
function read_chars (line 126) | static int read_chars(ROPacket *p, unsigned char *str, int nb_chars)
function opus_header_parse (line 136) | int opus_header_parse(const unsigned char *packet, int len, OpusHeader *h)
function opus_header_to_packet (line 219) | int opus_header_to_packet(const OpusHeader *h, unsigned char *packet, in...
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opus_header.h
type OpusHeader (line 37) | typedef struct {
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusdec.c
type shapestate (line 108) | typedef struct shapestate shapestate;
type shapestate (line 109) | struct shapestate {
function fast_rand (line 117) | static inline unsigned int fast_rand(void) {
function shape_dither_toshort (line 141) | static inline void shape_dither_toshort(shapestate *_ss, short *_o, floa...
function print_comments (line 195) | static void print_comments(char *comments, int length)
function FILE (line 253) | FILE *out_file_open(char *outFile, int *wav_format, int rate, int mappin...
function usage (line 378) | void usage(void)
function version (line 407) | void version(void)
function version_short (line 413) | void version_short(void)
function OpusMSDecoder (line 419) | static OpusMSDecoder *process_header(ogg_packet *op, opus_int32 *rate, i...
function opus_int64 (line 471) | opus_int64 audio_write(float *pcm, int channels, int frame_size, FILE *f...
function main (line 531) | int main(int argc, char **argv)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusenc.c
function oe_write_page (line 81) | static inline int oe_write_page(ogg_page *page, FILE *fp)
function opustoolsversion (line 93) | void opustoolsversion(const char *opusversion)
function opustoolsversion_short (line 99) | void opustoolsversion_short(const char *opusversion)
function usage (line 105) | void usage(void)
function print_time (line 157) | static inline void print_time(double seconds)
type option (line 175) | struct option
type timeval (line 246) | struct timeval
type timeval (line 247) | struct timeval
function comment_init (line 979) | static void comment_init(char **comments, int* length, const char *vendo...
function comment_add (line 998) | static void comment_add(char **comments, int* length, char *tag, char *val)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusenc.h
type oe_enc_opt (line 22) | typedef struct
type input_format (line 45) | typedef struct
type wav_fmt (line 55) | typedef struct {
type wavfile (line 65) | typedef struct {
type aiff_fmt (line 75) | typedef struct {
type wavfile (line 84) | typedef wavfile aifffile;
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusinfo.c
function stream_set (line 46) | static stream_set *create_stream_set(void) {
function oi_info (line 56) | void oi_info(char *format, ...)
function oi_warn (line 68) | void oi_warn(char *format, ...)
function oi_error (line 81) | void oi_error(char *format, ...)
function check_xiph_comment (line 92) | void check_xiph_comment(stream_processor *stream, int i, const char *com...
function process_null (line 250) | static void process_null(stream_processor *stream, ogg_page *page)
function process_other (line 257) | static void process_other(stream_processor *stream, ogg_page *page )
function free_stream_set (line 269) | static void free_stream_set(stream_set *set)
function streams_open (line 286) | static int streams_open(stream_set *set)
function null_start (line 298) | static void null_start(stream_processor *stream)
function other_start (line 305) | static void other_start(stream_processor *stream, char *type)
function stream_processor (line 315) | static stream_processor *find_stream_processor(stream_set *set, ogg_page...
function get_next_page (line 439) | static int get_next_page(FILE *f, ogg_sync_state *ogsync, ogg_page *page,
function process_file (line 467) | static void process_file(char *filename) {
function version (line 565) | static void version (void) {
function usage (line 569) | static void usage(void) {
function main (line 586) | int main(int argc, char **argv) {
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusinfo.h
type stream_processor (line 18) | typedef struct _stream_processor {
type stream_set (line 39) | typedef struct {
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/os_support.h
function speex_free (line 77) | static inline void speex_free (void *ptr)
function speex_free_scratch (line 85) | static inline void speex_free_scratch (void *ptr)
function _speex_fatal (line 109) | static inline void _speex_fatal(const char *str, const char *file, int l...
function speex_warning (line 117) | static inline void speex_warning(const char *str)
function speex_warning_int (line 126) | static inline void speex_warning_int(const char *str, int val)
function speex_notify (line 135) | static inline void speex_notify(const char *str)
function _speex_putc (line 145) | static inline void _speex_putc(int ch, void *file)
function print_vec (line 156) | static inline void print_vec(float *vec, int len, char *name)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/resample.c
function speex_free (line 68) | static void speex_free (void *ptr) {free(ptr);}
type SpeexResamplerState_ (line 111) | struct SpeexResamplerState_ {
type FuncDef (line 189) | struct FuncDef {
type FuncDef (line 194) | struct FuncDef
type FuncDef (line 198) | struct FuncDef
type FuncDef (line 200) | struct FuncDef
type FuncDef (line 202) | struct FuncDef
type QualityMapping (line 205) | struct QualityMapping {
type QualityMapping (line 223) | struct QualityMapping
function compute_func (line 237) | static double compute_func(float x, struct FuncDef *func)
function main (line 259) | int main(int argc, char **argv)
function spx_word16_t (line 272) | static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *w...
function spx_word16_t (line 285) | static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *w...
function cubic_coef (line 299) | static void cubic_coef(spx_word16_t x, spx_word16_t interp[4])
function cubic_coef (line 315) | static void cubic_coef(spx_word16_t frac, spx_word16_t interp[4])
function resampler_basic_direct_single (line 328) | static int resampler_basic_direct_single(SpeexResamplerState *st, spx_ui...
function resampler_basic_direct_double (line 385) | static int resampler_basic_direct_double(SpeexResamplerState *st, spx_ui...
function resampler_basic_interpolate_single (line 434) | static int resampler_basic_interpolate_single(SpeexResamplerState *st, s...
function resampler_basic_interpolate_double (line 496) | static int resampler_basic_interpolate_double(SpeexResamplerState *st, s...
function update_filter (line 556) | static void update_filter(SpeexResamplerState *st)
function SPX_RESAMPLE_EXPORT (line 724) | SPX_RESAMPLE_EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32...
function SPX_RESAMPLE_EXPORT (line 729) | SPX_RESAMPLE_EXPORT SpeexResamplerState *speex_resampler_init_frac(spx_u...
function SPX_RESAMPLE_EXPORT (line 788) | SPX_RESAMPLE_EXPORT void speex_resampler_destroy(SpeexResamplerState *st)
function speex_resampler_process_native (line 798) | static int speex_resampler_process_native(SpeexResamplerState *st, spx_u...
function speex_resampler_magic (line 824) | static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t c...
function SPX_RESAMPLE_EXPORT (line 845) | SPX_RESAMPLE_EXPORT int speex_resampler_process_int(SpeexResamplerState ...
function SPX_RESAMPLE_EXPORT (line 886) | SPX_RESAMPLE_EXPORT int speex_resampler_process_float(SpeexResamplerStat...
function SPX_RESAMPLE_EXPORT (line 959) | SPX_RESAMPLE_EXPORT int speex_resampler_process_interleaved_float(SpeexR...
function SPX_RESAMPLE_EXPORT (line 980) | SPX_RESAMPLE_EXPORT int speex_resampler_process_interleaved_int(SpeexRes...
function SPX_RESAMPLE_EXPORT (line 1001) | SPX_RESAMPLE_EXPORT int speex_resampler_set_rate(SpeexResamplerState *st...
function SPX_RESAMPLE_EXPORT (line 1006) | SPX_RESAMPLE_EXPORT void speex_resampler_get_rate(SpeexResamplerState *s...
function SPX_RESAMPLE_EXPORT (line 1012) | SPX_RESAMPLE_EXPORT int speex_resampler_set_rate_frac(SpeexResamplerStat...
function SPX_RESAMPLE_EXPORT (line 1051) | SPX_RESAMPLE_EXPORT void speex_resampler_get_ratio(SpeexResamplerState *...
function SPX_RESAMPLE_EXPORT (line 1057) | SPX_RESAMPLE_EXPORT int speex_resampler_set_quality(SpeexResamplerState ...
function SPX_RESAMPLE_EXPORT (line 1069) | SPX_RESAMPLE_EXPORT void speex_resampler_get_quality(SpeexResamplerState...
function SPX_RESAMPLE_EXPORT (line 1074) | SPX_RESAMPLE_EXPORT void speex_resampler_set_input_stride(SpeexResampler...
function SPX_RESAMPLE_EXPORT (line 1079) | SPX_RESAMPLE_EXPORT void speex_resampler_get_input_stride(SpeexResampler...
function SPX_RESAMPLE_EXPORT (line 1084) | SPX_RESAMPLE_EXPORT void speex_resampler_set_output_stride(SpeexResample...
function SPX_RESAMPLE_EXPORT (line 1089) | SPX_RESAMPLE_EXPORT void speex_resampler_get_output_stride(SpeexResample...
function SPX_RESAMPLE_EXPORT (line 1094) | SPX_RESAMPLE_EXPORT int speex_resampler_get_input_latency(SpeexResampler...
function SPX_RESAMPLE_EXPORT (line 1099) | SPX_RESAMPLE_EXPORT int speex_resampler_get_output_latency(SpeexResample...
function SPX_RESAMPLE_EXPORT (line 1104) | SPX_RESAMPLE_EXPORT int speex_resampler_skip_zeros(SpeexResamplerState *st)
function SPX_RESAMPLE_EXPORT (line 1112) | SPX_RESAMPLE_EXPORT int speex_resampler_reset_mem(SpeexResamplerState *st)
function SPX_RESAMPLE_EXPORT (line 1120) | SPX_RESAMPLE_EXPORT const char *speex_resampler_strerror(int err)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/speex_resampler.h
type SpeexResamplerState_ (line 115) | struct SpeexResamplerState_
type SpeexResamplerState (line 116) | typedef struct SpeexResamplerState_ SpeexResamplerState;
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/wav_io.c
function adjust_wav_mapping (line 40) | void adjust_wav_mapping(int mapping_family, int channels, unsigned char ...
function fwrite_le32 (line 55) | static size_t fwrite_le32(opus_int32 i32, FILE *file)
function fwrite_le16 (line 65) | static size_t fwrite_le16(int i16, FILE *file)
function write_wav_header (line 73) | int write_wav_header(FILE *file, int rate, int mapping_family, int chann...
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/wav_io.h
function opus_int32 (line 43) | static inline opus_int32 le_int(opus_int32 i)
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/wave_out.c
function Box (line 61) | static int
function wave_callback (line 73) | static void CALLBACK
function free_memory (line 87) | static void
function Int (line 110) | Int
function WIN_Play_Samples (line 150) | int
function WIN_Audio_close (line 200) | int
FILE: SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/wave_out.h
type Int (line 50) | typedef signed int Int;
type Uint (line 51) | typedef unsigned int Uint;
type Ldouble (line 52) | typedef long double Ldouble;
FILE: android_smart_glasses_frontend/main/app/src/androidTest/java/com/example/wearableintelligencesystemandroidsmartglasses/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 19) | @Test
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ASPClientSocket.java
class ASPClientSocket (line 35) | public class ASPClientSocket {
method ASPClientSocket (line 114) | private ASPClientSocket(Context context){
method getInstance (line 123) | public static ASPClientSocket getInstance(Context c){
method setIp (line 130) | public static void setIp(String ip){
method getInstance (line 137) | public static ASPClientSocket getInstance(){
method startSocket (line 144) | public void startSocket(){
method heartBeat (line 174) | private void heartBeat(){
method restartSocket (line 184) | public static void restartSocket() {
method stopThread (line 211) | public static void stopThread(Thread thread){
method my_int_to_bb_be (line 218) | public static byte[] my_int_to_bb_be(int myInteger){
method sendBytes (line 222) | public void sendBytes(byte[] id, byte [] data, String type){
method getConnected (line 289) | public int getConnected(){
class SocketThread (line 293) | static class SocketThread implements Runnable {
method run (line 294) | public void run() {
method my_bb_to_int_be (line 349) | public static int my_bb_to_int_be(byte [] byteBarray){
method getConnectState (line 353) | public boolean getConnectState(){
class ReceiveThread (line 361) | static class ReceiveThread implements Runnable {
method run (line 362) | @Override
class SendThread (line 429) | static class SendThread implements Runnable {
method SendThread (line 430) | SendThread() {
method run (line 432) | @Override
method parseData (line 469) | private void parseData(JSONObject data){
method setObservable (line 509) | public void setObservable(PublishSubject observable){
method startWebSocket (line 515) | public static void startWebSocket(){
class WebSocketThread (line 521) | static class WebSocketThread implements Runnable {
method run (line 522) | public void run() {
method getSocketStarted (line 531) | public boolean getSocketStarted(){
method getWebSocketStarted (line 535) | public boolean getWebSocketStarted(){
method getAudioSocketStarted (line 539) | public boolean getAudioSocketStarted(){
method updateUi (line 543) | private static void updateUi() {
method destroy (line 559) | public static void destroy(){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/AudioSystem.java
class AudioSystem (line 26) | public class AudioSystem {
method AudioSystem (line 61) | public AudioSystem(Context context){
method startStreaming (line 66) | public void startStreaming(){
type BluetoothState (line 77) | enum BluetoothState {
method onReceive (line 85) | @Override
method handleBluetoothStateChange (line 107) | private void handleBluetoothStateChange(BluetoothState state) {
method encryptBytes (line 116) | public byte [] encryptBytes(byte [] input){
method decryptBytes (line 122) | public byte [] decryptBytes(byte [] input) {
method sendBytes (line 127) | public void sendBytes(byte [] data) {
method receiveChunk (line 139) | private void receiveChunk(ByteBuffer chunk){
method activateBluetoothSco (line 145) | private void activateBluetoothSco() {
method setObservable (line 157) | public void setObservable(PublishSubject observable){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ImageAdapter.java
class ImageAdapter (line 17) | public class ImageAdapter extends BaseAdapter {
method ImageAdapter (line 32) | public ImageAdapter(Context c) {
method getCount (line 36) | public int getCount() {
method getItem (line 40) | @Override
method getItemId (line 45) | public long getItemId(int position) {
method getView (line 49) | public View getView(int position, View convertView, ViewGroup parent) {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/MainActivity.java
class MainActivity (line 49) | public class MainActivity extends AppCompatActivity {
method onCreate (line 104) | @Override
method onRequestPermissionsResult (line 163) | @Override
method turnOffScreen (line 181) | private void turnOffScreen(){
method turnOnScreen (line 185) | private void turnOnScreen(){
method screenBrightnessControl (line 189) | private void screenBrightnessControl(float brightness){
method setupHud (line 196) | private void setupHud(){
method updateWifiHud (line 232) | private void updateWifiHud(){
method updatePhoneHud (line 248) | private void updatePhoneHud(){
method updateBatteryHud (line 262) | private void updateBatteryHud(){
method switchMode (line 291) | private void switchMode(String mode) {
method setupTextList (line 355) | private void setupTextList() {
method setupTextBlock (line 371) | private void setupTextBlock() {
method blankUi (line 383) | private void blankUi() {
method onResume (line 387) | @Override
method teardownHud (line 400) | private void teardownHud() {
method onPause (line 406) | @Override
method makeComputeUpdateIntentFilter (line 420) | private static IntentFilter makeComputeUpdateIntentFilter() {
method onReceive (line 439) | @Override
method onBackPressed (line 504) | @Override
method onServiceConnected (line 512) | @Override
method onServiceDisconnected (line 525) | @Override
method onKeyUp (line 531) | @Override
method StartPartialWakeLock (line 558) | public void StartPartialWakeLock() {
method bindWearableAiService (line 566) | public void bindWearableAiService(){
method unbindWearableAiService (line 572) | public void unbindWearableAiService() {
method showReferenceCard (line 577) | private void showReferenceCard(String title, String body, String imgUr...
method showSearchEngineResults (line 600) | private void showSearchEngineResults(JSONObject data) {
method showReferenceCardSimpleView (line 626) | private void showReferenceCardSimpleView(JSONObject data) {
method showTextWallView (line 642) | private void showTextWallView(JSONObject data) {
method showReferenceCardImageView (line 673) | private void showReferenceCardImageView(JSONObject data) {
method stopWearableAiService (line 691) | public void stopWearableAiService() {
method sendWearableAiServiceMessage (line 702) | public void sendWearableAiServiceMessage(String message) {
method startWearableAiService (line 710) | public void startWearableAiService() {
method isMyServiceRunning (line 720) | private boolean isMyServiceRunning(Class<?> serviceClass) {
method showVoiceCommandInterface (line 730) | private void showVoiceCommandInterface(JSONObject data){
method showPostWakeWordInterface (line 780) | private void showPostWakeWordInterface(String wakeWord, JSONArray comm...
method showRequiredArgumentInterface (line 789) | private void showRequiredArgumentInterface(String argName, JSONArray a...
method showPostCommandInterface (line 797) | private void showPostCommandInterface(String wakeWord, String selected...
method showCommandResolve (line 805) | private void showCommandResolve(boolean success, String message){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/WearableAiService.java
class WearableAiService (line 51) | public class WearableAiService extends Service {
method onCreate (line 101) | @Override
class ReceiveAdvThread (line 155) | class ReceiveAdvThread extends Thread {
method run (line 156) | public void run() {
class StartGlbox (line 161) | class StartGlbox extends Thread {
method run (line 162) | public void run() {
method receiveUdpBroadcast (line 168) | public void receiveUdpBroadcast() {
method asp_comms_starter (line 201) | public void asp_comms_starter() {
method glbox_starter (line 214) | public void glbox_starter() {
method onDestroy (line 218) | @Override
class LocalBinder (line 233) | public class LocalBinder extends Binder {
method getService (line 234) | WearableAiService getService() {
method onBind (line 240) | @Override
method startMyOwnForeground (line 245) | private void startMyOwnForeground(){
method updateNotification (line 250) | private Notification updateNotification() {
method onStartCommand (line 279) | @Override
method startGlboxSocket (line 298) | private void startGlboxSocket() {
method getDir (line 307) | private File getDir() {
method isMyServiceRunning (line 314) | private boolean isMyServiceRunning(Class<?> serviceClass) {
method onReceive (line 325) | @Override
method updateUi (line 341) | private void updateUi() {
method requestUiUpdate (line 352) | public void requestUiUpdate(){
method handleDataStream (line 356) | private void handleDataStream(JSONObject data){
method wakeupScreen (line 371) | private void wakeupScreen() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/archive/AudioService.java
class AudioService (line 36) | public class AudioService extends Service {
method onStartCommand (line 93) | @Override
type BluetoothState (line 126) | enum BluetoothState {
method onReceive (line 134) | @Override
method handleBluetoothStateChange (line 156) | private void handleBluetoothStateChange(BluetoothState state) {
method onCreate (line 165) | @Override
method onDestroy (line 188) | @Override
method createNotificationChannel (line 193) | private void createNotificationChannel() {
method startSocket (line 207) | public void startSocket(){
method heartBeat (line 236) | private void heartBeat(){
method restartSocket (line 255) | public static void restartSocket() {
method encryptBytes (line 273) | public byte [] encryptBytes(byte [] input){
method decryptBytes (line 285) | public byte [] decryptBytes(byte [] input) {
method sendBytes (line 316) | public void sendBytes(byte [] data) {
class SocketThread (line 319) | static class SocketThread implements Runnable {
method run (line 320) | public void run() {
class SendThread (line 353) | static class SendThread implements Runnable {
method SendThread (line 354) | SendThread() {
method run (line 356) | @Override
method StartRecorder (line 389) | public void StartRecorder() {
method StopRecorder (line 394) | public void StopRecorder() {
method receiveChunk (line 400) | private void receiveChunk(ByteBuffer chunk){
method startStreaming (line 410) | private void startStreaming() {
class LocalBinder (line 464) | public class LocalBinder extends Binder {
method getService (line 465) | AudioService getService() {
method onBind (line 471) | @Override
method activateBluetoothSco (line 476) | private void activateBluetoothSco() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/archive/GlboxClientSocket.java
class GlboxClientSocket (line 36) | public class GlboxClientSocket {
method GlboxClientSocket (line 131) | private GlboxClientSocket(Context context){
method getInstance (line 140) | public static GlboxClientSocket getInstance(Context c){
method setIp (line 147) | public static void setIp(String ip){
method getInstance (line 151) | public static GlboxClientSocket getInstance(){
method startSocket (line 158) | public void startSocket(){
method heartBeat (line 188) | private void heartBeat(){
method restartSocket (line 206) | public static void restartSocket() {
method stopThread (line 230) | public static void stopThread(Thread thread){
method my_int_to_bb_be (line 237) | public static byte[] my_int_to_bb_be(int myInteger){
method sendBytes (line 301) | public void sendBytes(byte[] id, byte [] data, String type){
method getImageBuf (line 370) | public int getImageBuf(){
method getConnected (line 374) | public int getConnected(){
class SocketThread (line 378) | static class SocketThread implements Runnable {
method run (line 379) | public void run() {
method my_bb_to_int_be (line 426) | public static int my_bb_to_int_be(byte [] byteBarray){
class ReceiveThread (line 430) | static class ReceiveThread implements Runnable {
method run (line 431) | @Override
method getDir (line 679) | private static File getDir() {
method savePicture (line 685) | private static File savePicture(byte[] data){
class SendThread (line 716) | static class SendThread implements Runnable {
method SendThread (line 717) | SendThread() {
method run (line 719) | @Override
method readLine (line 758) | public static String readLine(DataInputStream in) throws IOException {
method setObservable (line 774) | public void setObservable(PublishSubject<JSONObject> observable){
method parseData (line 779) | private void parseData(JSONObject data){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/archive/SendImage.java
class SendImage (line 23) | class SendImage extends AsyncTask<byte [], Void, Void> {
method doInBackground (line 28) | @Override
method uploadImage (line 35) | private void uploadImage(byte[] data) {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/comms/AsgWebSocketClient.java
class AsgWebSocketClient (line 47) | public class AsgWebSocketClient extends WebSocketClient {
method AsgWebSocketClient (line 60) | public AsgWebSocketClient(URI serverUri, Draft draft) {
method sendHeartBeat (line 65) | public void sendHeartBeat(){
method AsgWebSocketClient (line 77) | public AsgWebSocketClient(WebSocketManager manager, URI serverURI) {
method AsgWebSocketClient (line 85) | public AsgWebSocketClient(URI serverUri, Map<String, String> httpHeade...
method setup (line 90) | private void setup(){
method setObservable (line 95) | public void setObservable(PublishSubject<JSONObject> dataO){
method setSourceName (line 99) | public void setSourceName(String name){
method getDataObservable (line 103) | public PublishSubject<JSONObject> getDataObservable(){
method stop (line 108) | public boolean stop(){
method onOpen (line 127) | @Override
method onMessage (line 138) | @Override
method onMessage (line 150) | @Override
method onClose (line 154) | @Override
method onError (line 175) | @Override
method getConnectionState (line 183) | public int getConnectionState(){
method parseData (line 197) | private void parseData(JSONObject data){
method sendJson (line 213) | public void sendJson(JSONObject data){
method sendString (line 218) | public void sendString(String data){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/comms/MessageTypes.java
class MessageTypes (line 3) | public class MessageTypes {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/comms/WebSocketManager.java
class WebSocketManager (line 16) | public class WebSocketManager implements Runnable{
method setObservable (line 33) | public void setObservable(PublishSubject<JSONObject> dataO){
method setSourceName (line 37) | public void setSourceName(String name){
method getConnectionState (line 41) | public int getConnectionState(){
method sendJson (line 49) | public void sendJson(JSONObject data){
method WebSocketManager (line 56) | public WebSocketManager(String ip, String port){
method setNewIp (line 92) | public void setNewIp(String ip){
method run (line 101) | @Override
method onClose (line 134) | protected void onClose(){
method runny (line 160) | protected void runny(){
method destroy (line 164) | public void destroy(){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/comms/WifiStatusCallback.java
type WifiStatusCallback (line 3) | public interface WifiStatusCallback{
method onSuccess (line 4) | void onSuccess(boolean connected);
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/comms/WifiUtils.java
class WifiUtils (line 12) | public class WifiUtils {
method checkWifiOnAndConnected (line 15) | public static boolean checkWifiOnAndConnected(Context context) {
class WifiReceiver (line 32) | public static class WifiReceiver extends BroadcastReceiver {
method WifiReceiver (line 35) | public WifiReceiver(WifiStatusCallback callback){
method onReceive (line 40) | @Override
method displayNetworkInfo (line 56) | public static void displayNetworkInfo(Context context) {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/sensors/AudioChunkCallback.java
type AudioChunkCallback (line 5) | public interface AudioChunkCallback{
method onSuccess (line 6) | void onSuccess(ByteBuffer chunk);
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/sensors/BluetoothMic.java
class BluetoothMic (line 26) | public class BluetoothMic {
method onReceive (line 68) | @Override
method handleBluetoothStateChange (line 115) | private void handleBluetoothStateChange(BluetoothState state) {
method handleNewBluetoothDevice (line 124) | private void handleNewBluetoothDevice(){
method handleDisconnectBluetoothDevice (line 140) | private void handleDisconnectBluetoothDevice() {
method BluetoothMic (line 170) | public BluetoothMic(Context context, AudioChunkCallback chunkCallback) {
method startRecording (line 201) | private void startRecording() {
method stopRecording (line 227) | private void stopRecording() {
method activateBluetoothSco (line 244) | private void activateBluetoothSco() {
method deactivateBluetoothSco (line 260) | private void deactivateBluetoothSco(){
method bluetoothStateChanged (line 265) | private void bluetoothStateChanged(BluetoothState state) {
class RecordingRunnable (line 281) | private class RecordingRunnable implements Runnable {
method run (line 283) | @Override
method getBufferReadFailureReason (line 305) | private String getBufferReadFailureReason(int errorCode) {
type BluetoothState (line 321) | enum BluetoothState {
method onTick (line 331) | @SuppressWarnings("synthetic-access")
method onFinish (line 341) | @SuppressWarnings("synthetic-access")
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/sensors/BluetoothScanner.java
class BluetoothScanner (line 12) | public class BluetoothScanner {
method BluetoothScanner (line 30) | public BluetoothScanner(Context context){
method startScan (line 60) | public void startScan(){
method stopScan (line 64) | public void stopScan(){
method scanLeDevice (line 68) | private void scanLeDevice(final boolean enable) {
method onLeScan (line 92) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/sensors/Muse.java
class Muse (line 16) | public class Muse extends Thread {
method onServiceConnected (line 27) | @Override
method onServiceDisconnected (line 39) | @Override
method Muse (line 45) | public Muse(Context context, String name, String address){
method run (line 52) | public void run(){
method connect (line 56) | public void connect(){
method disconnect (line 67) | public void disconnect(){
method makeGattUpdateIntentFilter (line 74) | private static IntentFilter makeGattUpdateIntentFilter() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/sensors/MuseService.java
class MuseService (line 59) | public class MuseService extends Service {
method onDestroy (line 108) | @Override
method onCreate (line 118) | @Override
method prepareNotification (line 132) | private Notification prepareNotification() {
method onStartCommand (line 172) | @Override
method onConnectionStateChange (line 188) | @Override
method onServicesDiscovered (line 213) | @Override
method onCharacteristicRead (line 230) | @Override
method onCharacteristicWrite (line 239) | @Override
method onDescriptorWrite (line 245) | @Override
method onCharacteristicChanged (line 250) | @Override
method broadcastUpdate (line 276) | private void broadcastUpdate(final String action) { final Intent inten...
method broadcastUpdate (line 280) | private void broadcastUpdate(final String action,
class LocalBinder (line 313) | public class LocalBinder extends Binder {
method getService (line 314) | MuseService getService() {
method onBind (line 319) | @Override
method onUnbind (line 324) | @Override
method setShouldStream (line 335) | public void setShouldStream(boolean stream){
method initialize (line 344) | public boolean initialize() {
method connect (line 375) | public boolean connect(final String address) {
method oldConn (line 407) | public boolean oldConn(final String address){
method museSetup (line 422) | public void museSetup(){
method disconnect (line 475) | public void disconnect() {
method close (line 488) | public void close() {
method readCharacteristic (line 505) | public void readCharacteristic(BluetoothGattCharacteristic characteris...
method getSupportedGattServices (line 552) | public List<BluetoothGattService> getSupportedGattServices() {
method discoverCharacteristics (line 561) | private void discoverCharacteristics(BluetoothGattService service) {
method giveCharacteristics (line 567) | private ArrayList<BluetoothGattCharacteristic> giveCharacteristics(Blu...
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/ASGFragment.java
class ASGFragment (line 29) | public class ASGFragment extends Fragment {
method onResume (line 35) | @Override
method onViewCreated (line 42) | @Override
method onPause (line 49) | @Override
method onReceive (line 56) | @Override
method onBroadcastReceive (line 62) | protected void onBroadcastReceive(Context context, Intent intent){
method makeComputeUpdateIntentFilter (line 66) | public IntentFilter makeComputeUpdateIntentFilter() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/CommandPostUi.java
class CommandPostUi (line 31) | public class CommandPostUi extends ASGFragment {
method CommandPostUi (line 37) | public CommandPostUi() {
method onCreate (line 41) | @Override
method onCreateView (line 46) | @Override
method onViewCreated (line 53) | @Override
method onResume (line 63) | @Override
method onPause (line 69) | @Override
method onReceive (line 76) | @Override
method setupCommandArgsTextView (line 94) | private void setupCommandArgsTextView(View view){
method makeComputeUpdateIntentFilter (line 116) | public IntentFilter makeComputeUpdateIntentFilter() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/CommandResolveUi.java
class CommandResolveUi (line 26) | public class CommandResolveUi extends ASGFragment {
method CommandResolveUi (line 31) | public CommandResolveUi() {
method onCreate (line 35) | @Override
method onCreateView (line 40) | @Override
method onViewCreated (line 47) | @Override
method onBroadcastReceive (line 72) | @Override
method updateVoiceResponse (line 78) | private void updateVoiceResponse(String voiceResponse) {
method makeComputeUpdateIntentFilter (line 82) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/ConvoModeUi.java
class ConvoModeUi (line 37) | public class ConvoModeUi extends ASGFragment {
method ConvoModeUi (line 43) | public ConvoModeUi() {
method onCreate (line 47) | @Override
method onCreateView (line 52) | @Override
method onViewCreated (line 59) | @Override
method onBroadcastReceive (line 67) | @Override
method makeComputeUpdateIntentFilter (line 80) | @Override
method showPotentialReferences (line 88) | private void showPotentialReferences(JSONArray refs) {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/HomePromptUi.java
class HomePromptUi (line 15) | public class HomePromptUi extends Fragment {
method HomePromptUi (line 22) | public HomePromptUi() {
method onCreate (line 25) | @Override
method onCreateView (line 30) | @Override
method onViewCreated (line 37) | @Override
method onResume (line 42) | @Override
method onPause (line 47) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/LanguageTranslateUi.java
class LanguageTranslateUi (line 37) | public class LanguageTranslateUi extends Fragment {
method LanguageTranslateUi (line 55) | public LanguageTranslateUi() {
method onCreate (line 58) | @Override
method onCreateView (line 63) | @Override
method onViewCreated (line 70) | @Override
method onResume (line 99) | @Override
method onPause (line 105) | @Override
method onReceive (line 112) | @Override
method makeComputeUpdateIntentFilter (line 127) | private static IntentFilter makeComputeUpdateIntentFilter() {
method scrollToBottom (line 134) | private void scrollToBottom(TextView tv) {
method getCurrentTranslateScrollText (line 157) | private Spanned getCurrentTranslateScrollText() {
method updateTranslatedText (line 175) | private void updateTranslatedText(String translationResultString){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/LiveLifeCaptionsUi.java
class LiveLifeCaptionsUi (line 37) | public class LiveLifeCaptionsUi extends Fragment {
method LiveLifeCaptionsUi (line 54) | public LiveLifeCaptionsUi() {
method onCreate (line 57) | @Override
method onCreateView (line 62) | @Override
method onViewCreated (line 69) | @Override
method onResume (line 99) | @Override
method onPause (line 105) | @Override
method onReceive (line 112) | @Override
method makeComputeUpdateIntentFilter (line 181) | private static IntentFilter makeComputeUpdateIntentFilter() {
method getCurrentTranscriptScrollText (line 192) | private Spanned getCurrentTranscriptScrollText() {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/ObjectTranslateUi.java
class ObjectTranslateUi (line 33) | public class ObjectTranslateUi extends ASGFragment {
method ObjectTranslateUi (line 40) | public ObjectTranslateUi() {
method onCreate (line 44) | @Override
method onCreateView (line 49) | @Override
method onViewCreated (line 56) | @Override
method onBroadcastReceive (line 67) | @Override
method onPause (line 83) | @Override
method onResume (line 88) | @Override
method showObjectTranslationResults (line 93) | private void showObjectTranslationResults(JSONObject objectTranslatedD...
method makeComputeUpdateIntentFilter (line 105) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/ReferenceUi.java
class ReferenceUi (line 30) | public class ReferenceUi extends ASGFragment {
method ReferenceUi (line 42) | public ReferenceUi() {
method onCreate (line 46) | @Override
method onDestroy (line 51) | @Override
method onDestroyView (line 57) | @Override
method onCreateView (line 63) | @Override
method onViewCreated (line 71) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/RequiredArgsUi.java
class RequiredArgsUi (line 22) | public class RequiredArgsUi extends ASGFragment {
method RequiredArgsUi (line 25) | public RequiredArgsUi() {
method onCreate (line 29) | @Override
method onCreateView (line 34) | @Override
method onViewCreated (line 41) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/SelectableImageGridUi.java
class SelectableImageGridUi (line 31) | public class SelectableImageGridUi extends ASGFragment {
method SelectableImageGridUi (line 43) | public SelectableImageGridUi() {
method onCreate (line 47) | @Override
method onCreateView (line 52) | @Override
method onViewCreated (line 59) | @Override
method selectImage (line 72) | private void selectImage(){
method showImages (line 78) | public void showImages(JSONArray data){
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/TextWallUi.java
class TextWallUi (line 21) | public class TextWallUi extends ASGFragment {
method TextWallUi (line 29) | public TextWallUi() {
method onCreate (line 33) | @Override
method onDestroy (line 38) | @Override
method onDestroyView (line 44) | @Override
method onCreateView (line 50) | @Override
method onViewCreated (line 58) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/UiUtils.java
class UiUtils (line 5) | public class UiUtils {
method scrollToBottom (line 6) | public static void scrollToBottom(TextView tv) {
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/WakeWordPostUi.java
class WakeWordPostUi (line 22) | public class WakeWordPostUi extends ASGFragment {
method WakeWordPostUi (line 25) | public WakeWordPostUi() {
method onCreate (line 29) | @Override
method onCreateView (line 34) | @Override
method onViewCreated (line 41) | @Override
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/ui/adapters/CommandListRecyclerViewAdapter.java
class CommandListRecyclerViewAdapter (line 16) | public class CommandListRecyclerViewAdapter extends RecyclerView.Adapter...
method CommandListRecyclerViewAdapter (line 23) | public CommandListRecyclerViewAdapter(Context context, JSONArray data) {
method onCreateViewHolder (line 29) | @Override
method onBindViewHolder (line 36) | @Override
method getItemCount (line 48) | @Override
class ViewHolder (line 55) | public class ViewHolder extends RecyclerView.ViewHolder implements Vie...
method ViewHolder (line 58) | ViewHolder(View itemView) {
method onClick (line 64) | @Override
method getItem (line 71) | String getItem(int id) {
method setClickListener (line 81) | void setClickListener(ItemClickListener itemClickListener) {
type ItemClickListener (line 86) | public interface ItemClickListener {
method onItemClick (line 87) | void onItemClick(View view, int position);
FILE: android_smart_glasses_frontend/main/app/src/main/java/com/wearableintelligencesystem/androidsmartglasses/utils/AES.java
class AES (line 13) | public class AES {
method setKey (line 18) | public static void setKey(String myKey)
method encrypt (line 36) | public static String encrypt(String strToEncrypt, String secret)
method encrypt (line 53) | public static byte [] encrypt(byte [ ] bytesToEncrypt, String secret)
method decrypt (line 70) | public static String decrypt(String strToDecrypt, String secret)
method decrypt (line 87) | public static byte [] decrypt(byte [] bytesToDecrypt, String secret)
FILE: android_smart_glasses_frontend/main/app/src/test/java/com/example/wearableintelligencesystemandroidsmartglasses/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
FILE: example_smart_glasses_app/app/src/androidTest/java/com/teamopensmartglasses/example_smart_glasses_app/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 18) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 20) | @Test
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/MainActivity.java
class MainActivity (line 31) | public class MainActivity extends AppCompatActivity {
method onCreate (line 51) | @Override
method makeMainServiceReceiverIntentFilter (line 76) | private static IntentFilter makeMainServiceReceiverIntentFilter() {
method onReceive (line 84) | @Override
method updateGlassesConnectionState (line 95) | public void updateGlassesConnectionState(int glassesConnectionState, S...
method onResume (line 107) | @Override
method onPause (line 125) | @Override
method stopSmartGlassesService (line 136) | public void stopSmartGlassesService() {
method startSmartGlassesService (line 146) | public void startSmartGlassesService() {
method isMyServiceRunning (line 160) | private boolean isMyServiceRunning(Class<?> serviceClass) {
method bindSmartGlassesService (line 193) | public void bindSmartGlassesService(){
method unbindSmartGlassesService (line 201) | public void unbindSmartGlassesService() {
method onServiceConnected (line 212) | @Override
method onServiceDisconnected (line 224) | @Override
method connectSmartGlasses (line 231) | public void connectSmartGlasses(SmartGlassesDevice device){
method areSmartGlassesConnected (line 242) | public boolean areSmartGlassesConnected(){
method changeAsrFramework (line 250) | public void changeAsrFramework(ASR_FRAMEWORKS asrFramework){
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/SmartGlassesService.java
class SmartGlassesService (line 13) | public class SmartGlassesService extends SmartGlassesAndroidService {
method SmartGlassesService (line 16) | public SmartGlassesService(){
method onTranscript (line 28) | @Subscribe
method onSmartRingButtonEvent (line 41) | @Subscribe
method onGlassesTapSideEvent (line 49) | @Subscribe
method deinit (line 57) | public void deinit(){
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/ConnectingToSmartGlassesUi.java
class ConnectingToSmartGlassesUi (line 18) | public class ConnectingToSmartGlassesUi extends Fragment {
method ConnectingToSmartGlassesUi (line 25) | public ConnectingToSmartGlassesUi() {
method onCreateView (line 28) | @Override
method onViewCreated (line 35) | @Override
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/GlassesConnectedFragment.java
class GlassesConnectedFragment (line 22) | public class GlassesConnectedFragment extends Fragment {
method GlassesConnectedFragment (line 29) | public GlassesConnectedFragment() {
method onCreateView (line 32) | @Override
method onViewCreated (line 39) | @Override
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/SelectSmartGlassesUi.java
class SelectSmartGlassesUi (line 24) | public class SelectSmartGlassesUi extends Fragment {
method SelectSmartGlassesUi (line 34) | public SelectSmartGlassesUi() {
method onCreate (line 38) | @Override
method onCreateView (line 43) | @Override
method onViewCreated (line 51) | @Override
method showNoGlassSelectedDialog (line 115) | public void showNoGlassSelectedDialog(){
method showUnsupportedGlassSelected (line 126) | public void showUnsupportedGlassSelected(){
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/SettingsUi.java
class SettingsUi (line 34) | public class SettingsUi extends Fragment {
method SettingsUi (line 46) | public SettingsUi() {
method onCreateView (line 49) | @Override
method onViewCreated (line 56) | @Override
method sendTestCard (line 149) | public void sendTestCard(){
method launchHotspotSettings (line 155) | private void launchHotspotSettings(){
method showAPIKeyDialog (line 165) | private void showAPIKeyDialog() {
method showDefaultAppDialog (line 188) | private void showDefaultAppDialog() {
method showNoGoogleAsrDialog (line 195) | public void showNoGoogleAsrDialog(){
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/SmartGlassesListAdapter.java
class SmartGlassesListAdapter (line 17) | public class SmartGlassesListAdapter extends ArrayAdapter<SmartGlassesDe...
method SmartGlassesListAdapter (line 23) | public SmartGlassesListAdapter(ArrayList<SmartGlassesDevice> glassesLi...
method getSelectedPosition (line 31) | public int getSelectedPosition() {
method setSelectedPosition (line 35) | public void setSelectedPosition(int selectedPosition) {
method getSelectedDevice (line 39) | public SmartGlassesDevice getSelectedDevice(){
method getView (line 47) | @Override
FILE: example_smart_glasses_app/app/src/main/java/com/teamopensmartglasses/example_smart_glasses_app/ui/UiUtils.java
class UiUtils (line 10) | public class UiUtils {
method setupTitle (line 13) | public static void setupTitle(Activity activity, String title) {
FILE: example_smart_glasses_app/app/src/test/java/com/teamopensmartglasses/example_smart_glasses_app/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
Condensed preview — 396 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,627K chars).
[
{
"path": ".gitignore",
"chars": 1770,
"preview": "__pycache__\n*.pyc\n\nazure_key.txt\n\n# data\n*.jpg\n*mp3\n*mp4\n# data/\n\n# models\nmodels/\n*.pkl\n*.h5\n*.scorer\n#*.tflite\n*.pbmm\n"
},
{
"path": ".gitmodules",
"chars": 0,
"preview": ""
},
{
"path": "LICENSE",
"chars": 1070,
"preview": "MIT License\n\nCopyright (c) 2021 Cayden Pierce\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
},
{
"path": "README.md",
"chars": 4611,
"preview": "# SmartGlassesManager\n\n### Update 2024 - **SmartGlassesManager** is now part of [AugmentOS](https://augmentos.org/), a u"
},
{
"path": "SGM_android/.gitignore",
"chars": 225,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
},
{
"path": "SGM_android/README.md",
"chars": 896,
"preview": "### Special instructions if you need to mess with the OGG streaming CPP JNI. \n\n\n0. Run Linux (as you should be).\n1. Inst"
},
{
"path": "SGM_android/SmartGlassesManager/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "SGM_android/SmartGlassesManager/CMakeLists.txt",
"chars": 140,
"preview": "cmake_minimum_required(VERSION 3.22.1)\n\nproject(\"some-name-needed-here\")\n\nadd_subdirectory(src/main/cpp)\nadd_subdirector"
},
{
"path": "SGM_android/SmartGlassesManager/build.gradle",
"chars": 6583,
"preview": "plugins {\n id 'com.android.library'\n// id 'kotlin-android'\n id 'com.google.protobuf' version '0.9.2'\n}\n\next {\n "
},
{
"path": "SGM_android/SmartGlassesManager/proguard-rules.pro",
"chars": 1026,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "SGM_android/SmartGlassesManager/src/androidTest/java/com/teamopensmartglasses/smartglassesmanager/ExampleInstrumentedTest.java",
"chars": 806,
"preview": "package com.teamopensmartglasses.smartglassesmanager;\n\nimport android.content.Context;\n\nimport androidx.test.platform.ap"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/AndroidManifest.xml",
"chars": 1694,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:to"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/CMakeLists.txt",
"chars": 1475,
"preview": "# Builds the ogg and opus encoder library which used third party module.\ncmake_minimum_required(VERSION 3.22.1)\n\n# set r"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/jni/CMakeLists.txt",
"chars": 274,
"preview": "#build for ogg_opus_encoder shared library\ncmake_minimum_required(VERSION 3.22.1)\n\nadd_library(ogg_opus_encoder SHARED o"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/jni/ogg_opus_encoder.cc",
"chars": 3508,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/jni/ogg_opus_encoder.h",
"chars": 2426,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libogg/Makefile.am",
"chars": 175,
"preview": "## Process this file with automake to produce Makefile.in\n\noggincludedir = $(includedir)/ogg\n\nogginclude_HEADERS = ogg.h"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libogg/config_types.h",
"chars": 538,
"preview": "#ifndef __CONFIG_TYPES_H__\n#define __CONFIG_TYPES_H__\n\n/* these are filled in by configure or cmake*/\n#define INCLUDE_IN"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libogg/config_types.h.in",
"chars": 600,
"preview": "#ifndef __CONFIG_TYPES_H__\n#define __CONFIG_TYPES_H__\n\n/* these are filled in by configure or cmake*/\n#define INCLUDE_IN"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libogg/ogg.h",
"chars": 8369,
"preview": "/********************************************************************\n * "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libogg/os_types.h",
"chars": 4773,
"preview": "/********************************************************************\n * "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus.h",
"chars": 48429,
"preview": "/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited\n Written by Jean-Marc Valin and Koen Vos */\n/*\n Redist"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_custom.h",
"chars": 14750,
"preview": "/* Copyright (c) 2007-2008 CSIRO\n Copyright (c) 2007-2009 Xiph.Org Foundation\n Copyright (c) 2008-2012 Gregory Maxwe"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_defines.h",
"chars": 34903,
"preview": "/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited\n Written by Jean-Marc Valin and Koen Vos */\n/*\n Redist"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_multistream.h",
"chars": 33539,
"preview": "/* Copyright (c) 2011 Xiph.Org Foundation\n Written by Jean-Marc Valin */\n/*\n Redistribution and use in source and bi"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_projection.h",
"chars": 28240,
"preview": "/* Copyright (c) 2017 Google Inc.\n Written by Andrew Allen */\n/*\n Redistribution and use in source and binary forms,"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/libopus/opus_types.h",
"chars": 5157,
"preview": "/* (C) COPYRIGHT 1994-2002 Xiph.Org Foundation */\n/* Modified by Jean-Marc Valin */\n/*\n Redistribution and use in sour"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/ogg_opus_encoder.cc",
"chars": 9923,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/ogg_opus_encoder.h",
"chars": 3947,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/cpp/opus_tools/opus_header.h",
"chars": 2070,
"preview": "/* Copyright (C)2012 Xiph.Org Foundation\n File: opus_header.h\n\n Redistribution and use in source and binary forms, w"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/SmartGlassesAndroidService.java",
"chars": 26259,
"preview": "package com.teamopensmartglasses.smartglassesmanager;\n\nimport android.app.Notification;\nimport android.app.NotificationC"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/SmartGlassesRepresentative.java",
"chars": 13472,
"preview": "package com.teamopensmartglasses.smartglassesmanager;\n\nimport android.content.Context;\n\nimport org.greenrobot.eventbus.E"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/AspWebsocketServer.java",
"chars": 7530,
"preview": "package com.teamopensmartglasses.smartglassesmanager.comms;\n\nimport java.net.InetSocketAddress;\n\nimport org.java_websock"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/AudioSystem.java",
"chars": 18307,
"preview": "package com.teamopensmartglasses.smartglassesmanager.comms;\n\nimport android.media.AudioFormat;\n\nimport android.util.Base"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/MessageTypes.java",
"chars": 10978,
"preview": "package com.teamopensmartglasses.smartglassesmanager.comms;\n\npublic class MessageTypes {\n //top level\n public stat"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/comms/VolleyCallback.java",
"chars": 187,
"preview": "package com.teamopensmartglasses.smartglassesmanager.comms;\n\nimport org.json.JSONObject;\n\npublic interface VolleyCallbac"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/AudioChunkNewEvent.java",
"chars": 214,
"preview": "package com.teamopensmartglasses.augmentoslib.events;\n\npublic class AudioChunkNewEvent {\n public byte [] thisChunk;\n\n"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/DisableBleScoAudioEvent.java",
"chars": 277,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class DisableBleScoAudioEvent {\n publi"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/GoogleAudioChunkNewEvent.java",
"chars": 243,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class GoogleAudioChunkNewEvent {\n publ"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/PauseAsrEvent.java",
"chars": 217,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class PauseAsrEvent {\n public boolean "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/PostGenericGlobalMessageEvent.java",
"chars": 249,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class PostGenericGlobalMessageEvent {\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/ScoStartEvent.java",
"chars": 217,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class ScoStartEvent {\n public boolean "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SetFontSizeEvent.java",
"chars": 357,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\nimport com.teamopensmartglasses.smartglassesmana"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SmartGlassesConnectedEvent.java",
"chars": 342,
"preview": "package com.teamopensmartglasses.augmentoslib.events;\n\nimport com.teamopensmartglasses.smartglassesmanager.supportedglas"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/SmartGlassesConnectionEvent.java",
"chars": 275,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class SmartGlassesConnectionEvent {\n p"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/TextToSpeechEvent.java",
"chars": 346,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class TextToSpeechEvent {\n public Stri"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/eventbusmessages/VoskAudioChunkNewEvent.java",
"chars": 239,
"preview": "package com.teamopensmartglasses.smartglassesmanager.eventbusmessages;\n\npublic class VoskAudioChunkNewEvent {\n public"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/AudioChunkCallback.java",
"chars": 164,
"preview": "package com.teamopensmartglasses.smartglassesmanager.hci;\n\nimport java.nio.ByteBuffer;\n\npublic interface AudioChunkCallb"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/HearItBleMicrophone.java",
"chars": 7767,
"preview": "package com.teamopensmartglasses.smartglassesmanager.hci;\n\nimport android.bluetooth.BluetoothAdapter;\nimport android.blu"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/hci/MicrophoneLocalAndBluetooth.java",
"chars": 12067,
"preview": "package com.teamopensmartglasses.smartglassesmanager.hci;\n\n//thanks to https://github.com/aahlenst/android-audiorecord-s"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/AndroidSGC.java",
"chars": 30148,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\nimport android.content.Context;\nimport "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/AudioWearableSGC.java",
"chars": 2813,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\nimport android.content.Context;\nimport "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesCommunicator.java",
"chars": 3224,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\nimport android.graphics.Bitmap;\n\nimport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesFontSize.java",
"chars": 152,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\npublic enum SmartGlassesFontSize {\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/SmartGlassesModes.java",
"chars": 155,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\npublic enum SmartGlassesModes {\n SCR"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/TextLineSG.java",
"chars": 559,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\npublic class TextLineSG {\n private S"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/UltraliteLayoutHelper.java",
"chars": 471,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\nimport com.vuzix.ultralite.Layout;\n\npub"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/smartglassescommunicators/UltraliteSGC.java",
"chars": 39307,
"preview": "package com.teamopensmartglasses.smartglassesmanager.smartglassescommunicators;\n\nimport android.content.Context;\nimport "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/ASR_FRAMEWORKS.java",
"chars": 182,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition;\n\npublic enum ASR_FRAMEWORKS {\n GOOGLE_ASR_FRA"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/SpeechRecFramework.java",
"chars": 494,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition;\n\nimport android.content.Context;\n\npublic abstrac"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/SpeechRecSwitchSystem.java",
"chars": 3746,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition;\n\nimport android.content.Context;\nimport android."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/azure/AzureAudioInputStream.java",
"chars": 2720,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.azure;\n\nimport com.microsoft.cognitiveservices.sp"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/azure/SpeechRecAzure.java",
"chars": 21997,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.azure;\n\nimport android.content.Context;\nimport an"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/deepgram/SpeechRecDeepgram.java",
"chars": 8385,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.deepgram;\n\nimport android.content.Context;\nimport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/SpeechRecGoogle.java",
"chars": 8159,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.google;\n\nimport static com.google.audio.asr.Speec"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/AlwaysSameSpeakerIDLabeler.java",
"chars": 1589,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/AlwaysSpeechPolicy.java",
"chars": 1143,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/RepeatingRecognitionSession.java",
"chars": 30898,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/RequestForRecognitionThread.java",
"chars": 3753,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SafeTranscriptionResultFormatter.java",
"chars": 12154,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechDetectionPolicy.java",
"chars": 1717,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSession.java",
"chars": 3046,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSessionFactory.java",
"chars": 949,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/SpeechSessionListener.java",
"chars": 1571,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TimeUtil.java",
"chars": 1587,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionErrorPublisher.java",
"chars": 865,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultFormatter.java",
"chars": 22896,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultReceiver.java",
"chars": 3534,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/TranscriptionResultUpdatePublisher.java",
"chars": 1576,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/CircularByteBuffer.java",
"chars": 7357,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/NetworkConnectionChecker.java",
"chars": 5179,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/ResponseTextUiAdapter.java",
"chars": 1601,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.google.asr.asrhelpers;\n\nimport android.view.Layou"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/SampleProcessorInterface.java",
"chars": 1242,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/SpeakerIDLabeler.java",
"chars": 1846,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/asr/asrhelpers/StreamingAudioEncoder.java",
"chars": 20327,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechSession.java",
"chars": 10764,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechSessionFactory.java",
"chars": 3896,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/CloudSpeechStreamObserver.java",
"chars": 9585,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/google/gcloudspeech/TimestampCalculator.java",
"chars": 4815,
"preview": "/*\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/vad/VadGateSpeechPolicy.java",
"chars": 3804,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.vad;\n\nimport android.content.Context;\nimport andr"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/speechrecognition/vosk/SpeechRecVosk.java",
"chars": 12400,
"preview": "package com.teamopensmartglasses.smartglassesmanager.speechrecognition.vosk;\n\n//Vosk ASR\n\nimport android.content.Context"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/AndroidPhoneTestGlasses.java",
"chars": 620,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\n// this is the test device, when someone runs th"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/AudioWearable.java",
"chars": 668,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class AudioWearable extends SmartGlassesD"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/EngoTwo.java",
"chars": 522,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class EngoTwo extends SmartGlassesDevice "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/EvenRealitiesG1.java",
"chars": 582,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class EvenRealitiesG1 extends SmartGlasse"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/InmoAirOne.java",
"chars": 730,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\n// these glasses are pretty bad. There's no home"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/InmoGo.java",
"chars": 536,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class InmoGo extends SmartGlassesDevice {"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/SmartGlassesDevice.java",
"chars": 2735,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\nimport java.io.Serializable;\n\npublic class Smart"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/SmartGlassesOperatingSystem.java",
"chars": 289,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic enum SmartGlassesOperatingSystem {\n AN"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/TCLRayNeoXTwo.java",
"chars": 552,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class TCLRayNeoXTwo extends SmartGlassesD"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/VuzixShield.java",
"chars": 521,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class VuzixShield extends SmartGlassesDev"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/supportedglasses/VuzixUltralite.java",
"chars": 568,
"preview": "package com.teamopensmartglasses.smartglassesmanager.supportedglasses;\n\npublic class VuzixUltralite extends SmartGlasses"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/texttospeech/TextToSpeechSystem.java",
"chars": 6041,
"preview": "package com.teamopensmartglasses.smartglassesmanager.texttospeech;\n\nimport android.content.Context;\nimport android.media"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/AES.java",
"chars": 3082,
"preview": "package com.teamopensmartglasses.smartglassesmanager.utils;\n\nimport android.util.Base64;\n\nimport java.io.UnsupportedEnco"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/BitmapJavaUtils.java",
"chars": 628,
"preview": "package com.teamopensmartglasses.smartglassesmanager.utils;\n\nimport java.io.File;\nimport android.graphics.Bitmap;\nimport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/NetworkUtils.java",
"chars": 7708,
"preview": "package com.teamopensmartglasses.smartglassesmanager.utils;\n\nimport android.util.Log;\n\nimport java.net.DatagramSocket;\ni"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/java/com/teamopensmartglasses/smartglassesmanager/utils/PermissionsUtils.java",
"chars": 7928,
"preview": "package com.teamopensmartglasses.smartglassesmanager.utils;\n\nimport android.Manifest;\nimport android.app.AlertDialog;\nim"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/asr/cloud_speech_session_params.proto",
"chars": 1222,
"preview": "syntax = \"proto2\";\n\npackage asr;\n\nimport \"com/google/audio/asr/cloud_speech_stream_observer_params.proto\";\nimport \"com/g"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/asr/cloud_speech_stream_observer_params.proto",
"chars": 397,
"preview": "syntax = \"proto2\";\n\npackage asr;\n\noption java_package = \"com.google.audio.asr\";\noption java_outer_classname = \"CloudSpee"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/asr/speech_recognition_model_options.proto",
"chars": 776,
"preview": "syntax = \"proto2\";\n\npackage asr;\n\noption java_package = \"com.google.audio.asr\";\noption java_outer_classname = \"SpeechRec"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/asr/transcription_result.proto",
"chars": 1943,
"preview": "syntax = \"proto2\";\n\npackage asr;\n\nimport \"com/google/audio/speaker_id_info.proto\";\nimport \"google/protobuf/timestamp.pro"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/asr/transcription_result_formatter_options.proto",
"chars": 2133,
"preview": "syntax = \"proto2\";\n\npackage asr;\n\nimport \"google/protobuf/duration.proto\";\n\noption java_package = \"com.google.audio.asr\""
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/codec_and_bitrate.proto",
"chars": 1304,
"preview": "syntax = \"proto2\";\n\npackage audio;\n\noption java_package = \"com.google.audio\";\noption java_multiple_files = true;\n\n// In "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/network_state.proto",
"chars": 433,
"preview": "syntax = \"proto2\";\n\npackage audio;\n\noption java_package = \"com.google.audio\";\noption java_multiple_files = true;\n\n// Con"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/proto/com/google/audio/speaker_id_info.proto",
"chars": 259,
"preview": "syntax = \"proto2\";\n\npackage audio;\n\noption java_package = \"com.google.audio\";\noption java_multiple_files = true;\n\nmessag"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/ic_launcher_background.xml",
"chars": 4867,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n android:height=\"108dp\"\n android:width=\"108dp\"\n android:viewport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/outline_device_hub_24.xml",
"chars": 459,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/outline_groups_24.xml",
"chars": 1179,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/outline_memory_24.xml",
"chars": 561,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/outline_settings_24.xml",
"chars": 2065,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/pretty_thin_border.xml",
"chars": 369,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\""
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/rounded_corner.xml",
"chars": 431,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n<!-- <stro"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/rounded_corners_bg.xml",
"chars": 341,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <solid and"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/rounded_shadow_bg.xml",
"chars": 656,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <it"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/sgm_launcher_background.xml",
"chars": 4867,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n android:height=\"108dp\"\n android:width=\"108dp\"\n android:viewport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/textview_background.xml",
"chars": 340,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <gradient"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/wis_launcher_background.xml",
"chars": 4867,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n android:height=\"108dp\"\n android:width=\"108dp\"\n android:viewport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable/wis_launcher_transparent_background.xml",
"chars": 4867,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n android:height=\"108dp\"\n android:width=\"108dp\"\n android:viewport"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/drawable-v24/ic_launcher_foreground.xml",
"chars": 1880,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:aapt=\"http://schemas.android.com/aapt\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/activity_main.xml",
"chars": 3495,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/all_transcripts_fragment.xml",
"chars": 963,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/api_key_message.xml",
"chars": 1065,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/connecting_to_glasses_fragment.xml",
"chars": 2288,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/default_app_dialog.xml",
"chars": 457,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/export_data_fragment.xml",
"chars": 2817,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/glasses_connected_fragment.xml",
"chars": 2179,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/image_item.xml",
"chars": 972,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/main_ui_fragment.xml",
"chars": 3159,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/menu_item_exposed_dropdown.xml",
"chars": 296,
"preview": "<TextView\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n and"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/phrase_context_fragment.xml",
"chars": 3445,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/phrase_recyclerview_item.xml",
"chars": 571,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/reference_card_recyclerview_item.xml",
"chars": 2399,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/response_text_box.xml",
"chars": 631,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n and"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/select_glasses_fragment.xml",
"chars": 2317,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/settings_fragment.xml",
"chars": 4278,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/smart_glasses_debug_fragment.xml",
"chars": 796,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/layout/smart_glasses_list_item.xml",
"chars": 1522,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas."
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/menu/bottom_nav_main_menu.xml",
"chars": 1314,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2017 The Android Open Source Project\n Licensed under the Apache"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/menu/memory_cache_menu.xml",
"chars": 195,
"preview": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item\n android:id=\"@+id/name_cache\"\n "
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 269,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 269,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/sgm_launcher.xml",
"chars": 270,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/sgm_launcher_round.xml",
"chars": 270,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/wis_launcher.xml",
"chars": 270,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/wis_launcher_round.xml",
"chars": 270,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/wis_launcher_transparent.xml",
"chars": 294,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/mipmap-anydpi-v26/wis_launcher_transparent_round.xml",
"chars": 294,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/navigation/nav_graph.xml",
"chars": 3519,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<navigation xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/values/colors.xml",
"chars": 542,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#960000</color>\n <color name=\"color"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/values/dimens.xml",
"chars": 1101,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2017 The Android Open Source Project\n Licensed under the Apache"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/values/strings.xml",
"chars": 1892,
"preview": "<resources>\n <string name=\"app_name\">Smart Glasses Manager</string>\n <string name=\"key\">TEMPORARYKEY_CHANGETHISKEY"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/values/styles.xml",
"chars": 2361,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.MaterialComponents.Light.NoAc"
},
{
"path": "SGM_android/SmartGlassesManager/src/main/res/xml/file_provider.xml",
"chars": 127,
"preview": "<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <external-path name=\"external_files\" path=\".\"/>\n<"
},
{
"path": "SGM_android/SmartGlassesManager/src/test/java/com/teamopensmartglasses/smartglassesmanager/ExampleUnitTest.java",
"chars": 405,
"preview": "package com.teamopensmartglasses.smartglassesmanager;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n *"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/CMakeLists.txt",
"chars": 1238,
"preview": "cmake_minimum_required(VERSION 3.4.1)\ninclude(ExternalProject)\n\nset(opus_tools_src ${CMAKE_CURRENT_SOURCE_DIR}/opus_tool"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/CMakeLists_libogg.txt",
"chars": 810,
"preview": "cmake_minimum_required(VERSION 3.4.1)\ninclude(ExternalProject)\n\nset(libogg_src ${CMAKE_CURRENT_SOURCE_DIR}/libogg/src)\nE"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/CMakeLists_libopus.txt",
"chars": 816,
"preview": "cmake_minimum_required(VERSION 3.4.1)\ninclude(ExternalProject)\n\nset(libopus_src ${CMAKE_CURRENT_SOURCE_DIR}/libopus/src)"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/CMakeLists_opus-tools.txt",
"chars": 1238,
"preview": "cmake_minimum_required(VERSION 3.4.1)\ninclude(ExternalProject)\n\nset(opus_tools_src ${CMAKE_CURRENT_SOURCE_DIR}/opus_tool"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/.gitignore",
"chars": 436,
"preview": "INSTALL\nlibtool\nMakefile.in\naclocal.m4\nautom4te.cache\nconfig.guess\nconfig.h.in\nconfig.sub\nconfigure\ndepcomp\ninstall-sh\nl"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/AUTHORS",
"chars": 207,
"preview": "Gregory Maxwell (greg@xiph.org)\nJean-Marc Valin - Original opusdec implementation / Resampler\nThorvald Natvig - Resample"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/CMakeLists.txt",
"chars": 165,
"preview": "# For opus_tools only.\ncmake_minimum_required(VERSION 3.4.1)\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=gnu++11\")\nadd_"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/COPYING",
"chars": 19457,
"preview": "\nOpus-tools, with the exception of opusinfo.[ch] is available under\nthe following two clause BSD-style license:\n\nRedistr"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/ChangeLog",
"chars": 86,
"preview": "2012-05-16 Gregory Maxwell <greg@xiph.org>\n\n * Initial public version, 0.1.0\n"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/Makefile.am",
"chars": 1388,
"preview": "\n#AUTOMAKE_OPTIONS = subdir-objects 1.6 dist-zip\nAUTOMAKE_OPTIONS = subdir-objects 1.11 dist-zip dist-xz\n\nSUBDIRS = .\n\nI"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/Makefile.unix",
"chars": 1186,
"preview": "#Opus-tools should be built with autotools, not this makefile.\n#Run ./configure to run autotools/autoconf.\n#This makefil"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/NEWS",
"chars": 0,
"preview": ""
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/README",
"chars": 0,
"preview": ""
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/autogen.sh",
"chars": 3371,
"preview": "#!/bin/sh\n# Run this to set up the build system: configure, makefiles, etc.\n# (based on the version in enlightenment's c"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/configure.ac",
"chars": 8709,
"preview": "dnl Process this file with autoconf to produce a configure script. -*-m4-*-\n\nAC_INIT(src/opusenc.c)\n\nAM_CONFIG_HEADER([c"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/man/opusdec.1",
"chars": 2273,
"preview": ".\\\" Process this file with\n.\\\" groff -man -Tascii opusdec.1\n.\\\"\n.TH opusdec 1 2012-05-28 \"Xiph.Org Foundation\" \"opus-too"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/man/opusenc.1",
"chars": 4559,
"preview": ".\\\" Process this file with\n.\\\" groff -man -Tascii opusenc.1\n.\\\"\n.TH opusenc 1 2012-05-28 \"Xiph.Org Foundation\" \"opus-too"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/man/opusinfo.1",
"chars": 1772,
"preview": ".\\\" Process this file with\n.\\\" groff -man -Tascii opusinfo.1\n.\\\"\n.TH opusinfo 1 2012-05-28 \"Xiph.Org Foundation\" \"opus-t"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/arch.h",
"chars": 7019,
"preview": "/* Copyright (C) 2003 Jean-Marc Valin */\n/**\n @file arch.h\n @brief Various architecture definitions Speex\n*/\n/*\n R"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/audio-in.c",
"chars": 31027,
"preview": "/* Copyright 2000-2002, Michael Smith <msmith@xiph.org>\n 2010, Monty <monty@xiph.org>\n AIFF/AIFC support f"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/diag_range.c",
"chars": 7195,
"preview": "/* Copyright (C)2012 Xiph.Org Foundation\n Copyright (C)2012 Gregory Maxwell\n Copyright (C)2012 Jean-Marc Valin\n Fi"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/diag_range.h",
"chars": 1474,
"preview": "/* Copyright (C)2012 Xiph.Org Foundation\n File: diag_range.h\n\n Redistribution and use in source and binary forms, wi"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/info_opus.c",
"chars": 14035,
"preview": "/* Copyright (C)2012 Gregory Maxwell\n File: info_opus.c\n\n Redistribution and use in source and binary forms, with or"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/info_opus.h",
"chars": 2025,
"preview": "/* Copyright (C)2012 Gregory Maxwell\n File: info_opus.h\n\n Redistribution and use in source and binary forms, with or"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/lpc.c",
"chars": 4549,
"preview": "/********************************************************************\n * "
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/lpc.h",
"chars": 1230,
"preview": "/********************************************************************\n * "
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opus_header.c",
"chars": 7249,
"preview": "/* Copyright (C)2012 Xiph.Org Foundation\n File: opus_header.c\n\n Redistribution and use in source and binary forms, w"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opus_header.h",
"chars": 2092,
"preview": "/* Copyright (C)2012 Xiph.Org Foundation\n File: opus_header.h\n\n Redistribution and use in source and binary forms, w"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusdec.c",
"chars": 27136,
"preview": "/* Copyright (c) 2002-2007 Jean-Marc Valin\n Copyright (c) 2008 CSIRO\n Copyright (c) 2007-2012 Xiph.Org Foundation\n "
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusenc.c",
"chars": 37806,
"preview": "/* Copyright (C)2002-2011 Jean-Marc Valin\n Copyright (C)2007-2012 Xiph.Org Foundation\n Copyright (C)2008-2012 Gregor"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusenc.h",
"chars": 2504,
"preview": "#ifndef __OPUSENC_H\n#define __OPUSENC_H\n\n#include <opus_types.h>\n\n#ifdef ENABLE_NLS\n#include <libintl.h>\n#define _(X) ge"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusinfo.c",
"chars": 19408,
"preview": "/* Opusinfo\n *\n * A tool to describe opus file contents and metadata.\n *\n * This is a fork of ogginfo from the vorbis-to"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/opusinfo.h",
"chars": 1081,
"preview": "/* Ogginfo\n *\n * A tool to describe ogg file contents and metadata.\n *\n * Copyright 2002-2005 Michael Smith <msmith@xiph"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/os_support.h",
"chars": 5174,
"preview": "/* Copyright (C) 2007 Jean-Marc Valin\n \n File: os_support.h\n\n Redistribution and use in source and binary forms"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/resample.c",
"chars": 41694,
"preview": "/* Copyright (C) 2007-2008 Jean-Marc Valin\n Copyright (C) 2008 Thorvald Natvig\n \n File: resample.c\n Arbi"
},
{
"path": "SGM_android/SmartGlassesManager/third_party/opus_tools/src/src/speex_resampler.h",
"chars": 14791,
"preview": "/* Copyright (C) 2007 Jean-Marc Valin\n \n File: speex_resampler.h\n Resampling code\n \n The design goals of"
}
]
// ... and 196 more files (download for full content)
About this extraction
This page contains the full source code of the TeamOpenSmartGlasses/SmartGlassesManager GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 396 files (1.5 MB), approximately 381.5k tokens, and a symbol index with 1612 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.