public
static
Final
TranslateerApi.Options.TfLiteRuntime
FROM_APPLICATION_ONLY
애플리케이션에 연결된 TF Lite 런타임 구현을 사용합니다. 애플리케이션에 연결된 적합한 TF Lite 런타임 구현이 없는 경우 이 TfLiteRuntime 설정으로 TranslateerApi 인스턴스를 만들려고 하면 OS 또는 시스템 서비스에서 TF Lite 런타임 구현을 제공할 수 있더라도 IllegalStateException 예외가 발생합니다.
기본 설정입니다. 이 설정은 TF Lite 런타임 구현을 제공하지 않는 시스템에서 실행해야 하는 앱에도 적합합니다.
public
static
Final
TranslateerApi.Options.TfLiteRuntime
FROM_SYSTEM_ONLY
OS나 시스템 서비스에서 제공하는 TF Lite 런타임 구현을 사용합니다. 이 속성은 Google Play 서비스와 같은 시스템 라이브러리 / 공유 객체 / 서비스에서 가져옵니다. 애플리케이션에 연결된 버전보다 최신 버전일 수 있습니다 (있는 경우). 시스템에서 제공하는 적절한 TF Lite 런타임 구현이 없는 경우 이 TfLiteRuntime 설정으로 TranslateerApi 인스턴스를 만들려고 하면 애플리케이션에 연결된 TF Lite 런타임 구현이 있더라도 IllegalStateException 예외가 발생합니다.
이 설정은 앱 바이너리 크기를 줄일 수 있고 더 자주 업데이트할 수 있는 시스템 제공 TF Lite 런타임을 사용하는 코드에 적합합니다.
public
static
Final
TranslateerApi.Options.TfLiteRuntime
PREFER_SYSTEM_OVER_APPLICATION
시스템에서 제공하는 TF Lite 런타임 구현(있는 경우)을 사용하고 그렇지 않은 경우 애플리케이션에 연결된 TF Lite 런타임 구현을 사용합니다(있는 경우). 어떤 위치에서도 적절한 TF Lite 런타임을 찾을 수 없는 경우 이 TFLiteRuntime 설정으로 TranslateerApi 인스턴스를 만들려고 하면 IllegalStateException이 발생합니다. 애플리케이션에 연결된 적절한 TF Lite 런타임과 시스템에서 제공하는 적절한 TF Lite 런타임이 모두 있는 경우 시스템에서 제공하는 런타임이 사용됩니다.
이 설정은 TF Lite 런타임의 출처를 신경 쓰지 않는 코드 (예: 미들웨어 레이어)에 사용하는 데 적합합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-24(UTC)"],[],[],null,["# InterpreterApi.Options.TfLiteRuntime\n\npublic static final enum **InterpreterApi.Options.TfLiteRuntime** \nEnum to represent where to get the TensorFlow Lite runtime implementation from.\n\nThe difference between this class and the RuntimeFlavor class: This class specifies a\n*preference* which runtime to use, whereas [RuntimeFlavor](/edge/api/tflite/java/org/tensorflow/lite/RuntimeFlavor) specifies which exact\nruntime *is* being used.\n\n\u003cbr /\u003e\n\n### Inherited Methods\n\nFrom class java.lang.Enum \n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| final int | compareTo([InterpreterApi.Options.TfLiteRuntime](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options.TfLiteRuntime) arg0) |\n| int | compareTo([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c[InterpreterApi.Options.TfLiteRuntime](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options.TfLiteRuntime)\\\u003e | getDeclaringClass() |\n| final int | hashCode() |\n| final [String](https://developer.android.com/reference/java/lang/String.html) | name() |\n| final int | ordinal() |\n| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |\n| static \\\u003cT extends [Enum](https://developer.android.com/reference/java/lang/Enum.html)\\\u003cT\\\u003e\\\u003e T | valueOf([Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003cT\\\u003e arg0, [String](https://developer.android.com/reference/java/lang/String.html) arg1) |\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface java.lang.Comparable \n\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | compareTo([InterpreterApi.Options.TfLiteRuntime](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options.TfLiteRuntime) arg0) |\n\nEnum Values\n-----------\n\n#### public static final InterpreterApi.Options.TfLiteRuntime\n**FROM_APPLICATION_ONLY**\n\nUse a TF Lite runtime implementation that is linked into the application. If there is no\nsuitable TF Lite runtime implementation linked into the application, then attempting to\ncreate an InterpreterApi instance with this TfLiteRuntime setting will throw an\nIllegalStateException exception (even if the OS or system services could provide a TF Lite\nruntime implementation).\n\nThis is the default setting. This setting is also appropriate for apps that must run on\nsystems that don't provide a TF Lite runtime implementation.\n\n\u003cbr /\u003e\n\n#### public static final InterpreterApi.Options.TfLiteRuntime\n**FROM_SYSTEM_ONLY**\n\nUse a TF Lite runtime implementation provided by the OS or system services. This will be\nobtained from a system library / shared object / service, such as Google Play Services. It\nmay be newer than the version linked into the application (if any). If there is no suitable\nTF Lite runtime implementation provided by the system, then attempting to create an\nInterpreterApi instance with this TfLiteRuntime setting will throw an IllegalStateException\nexception (even if there is a TF Lite runtime implementation linked into the application).\n\nThis setting is appropriate for code that will use a system-provided TF Lite runtime,\nwhich can reduce app binary size and can be updated more frequently.\n\n\u003cbr /\u003e\n\n#### public static final InterpreterApi.Options.TfLiteRuntime\n**PREFER_SYSTEM_OVER_APPLICATION**\n\nUse a system-provided TF Lite runtime implementation, if any, otherwise use the TF Lite\nruntime implementation linked into the application, if any. If no suitable TF Lite runtime\ncan be found in any location, then attempting to create an InterpreterApi instance with\nthis TFLiteRuntime setting will throw an IllegalStateException. If there is both a suitable\nTF Lite runtime linked into the application and also a suitable TF Lite runtime provided by\nthe system, the one provided by the system will be used.\n\nThis setting is suitable for use in code that doesn't care where the TF Lite runtime is\ncoming from (e.g. middleware layers).\n\n\u003cbr /\u003e"]]