File tree Expand file tree Collapse file tree
executorch_android/src/main/java/org/pytorch/executorch/extension/asr Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
170170endif ()
171171
172172if (EXECUTORCH_BUILD_LLAMA_JNI)
173- target_sources (executorch_jni PRIVATE jni/jni_layer_llama.cpp jni/log.cpp )
174- list (APPEND link_libraries extension_llm_runner)
173+ target_sources (executorch_jni PRIVATE jni/jni_layer_llama.cpp jni/jni_layer_asr.cpp jni/ log.cpp )
174+ list (APPEND link_libraries extension_llm_runner extension_asr_runner )
175175 target_compile_definitions (executorch_jni PUBLIC EXECUTORCH_BUILD_LLAMA_JNI=1 )
176176
177177 if (QNN_SDK_ROOT)
@@ -224,11 +224,6 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
224224 endif ()
225225endif ()
226226
227- if (EXECUTORCH_BUILD_ASR_JNI)
228- target_sources (executorch_jni PRIVATE jni/jni_layer_asr.cpp )
229- list (APPEND link_libraries extension_asr_runner)
230- endif ()
231-
232227target_include_directories (
233228 executorch_jni
234229 PRIVATE
Original file line number Diff line number Diff line change 88
99package org.pytorch.executorch.extension.asr
1010
11+ import org.pytorch.executorch.annotations.Experimental
12+
1113/* *
1214 * Callback interface for ASR (Automatic Speech Recognition) module.
1315 * Users can implement this interface to receive the transcribed tokens
1416 * and completion notification.
1517 *
1618 * Warning: These APIs are experimental and subject to change without notice
1719 */
20+ @Experimental
1821interface AsrCallback {
1922 /* *
2023 * Called when a new token is available from JNI.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ package org.pytorch.executorch.extension.asr
1010
1111import java.io.Closeable
1212import java.io.File
13+ import org.pytorch.executorch.annotations.Experimental
1314
1415/* *
1516 * AsrModule is a wrapper around the ExecuTorch ASR Runner. It provides a simple interface to
@@ -24,6 +25,7 @@ import java.io.File
2425 * @param tokenizerPath Path to the tokenizer file
2526 * @param dataPath Optional path to additional data file (e.g., for delegate data)
2627 */
28+ @Experimental
2729class AsrModule (
2830 modelPath : String ,
2931 tokenizerPath : String ,
Original file line number Diff line number Diff line change 88
99package org.pytorch.executorch.extension.asr
1010
11+ import org.pytorch.executorch.annotations.Experimental
12+
1113/* *
1214 * Configuration for ASR transcription.
1315 *
@@ -17,6 +19,7 @@ package org.pytorch.executorch.extension.asr
1719 * @property temperature Temperature for sampling. 0.0 means greedy decoding
1820 * @property decoderStartTokenId The token ID to start decoding with (e.g., language token for Whisper)
1921 */
22+ @Experimental
2023data class AsrTranscribeConfig (
2124 val maxNewTokens : Long = 128 ,
2225 val temperature : Float = 0.0f ,
You can’t perform that action at this time.
0 commit comments