Skip to content

Commit b6c4488

Browse files
committed
Experimental
1 parent 9b80f2e commit b6c4488

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

extension/android/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
170170
endif()
171171

172172
if(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()
225225
endif()
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-
232227
target_include_directories(
233228
executorch_jni
234229
PRIVATE

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/asr/AsrCallback.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
package 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
1821
interface AsrCallback {
1922
/**
2023
* Called when a new token is available from JNI.

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/asr/AsrModule.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package org.pytorch.executorch.extension.asr
1010

1111
import java.io.Closeable
1212
import 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
2729
class AsrModule(
2830
modelPath: String,
2931
tokenizerPath: String,

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/asr/AsrTranscribeConfig.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
package 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
2023
data class AsrTranscribeConfig(
2124
val maxNewTokens: Long = 128,
2225
val temperature: Float = 0.0f,

0 commit comments

Comments
 (0)