[iFlytek Spark Cognitive Large Model] Large Model of Spark Mobile Assistant

Table of contents

1. Introduction to the iFlytek Spark cognitive model

2. API application

3. Spark Mobile Assistant

4. Effect display


1. Introduction to the iFlytek Spark cognitive model

The iFlytek Spark Cognitive Large Model is a natural language processing model based on deep learning independently developed by iFlytek. It can understand and generate Chinese and perform a variety of tasks, such as question and answer, translation, writing, programming, etc. Its goal is to achieve "intelligent emergence", cover objective evaluations in multiple dimensions, tasks and industries, and benchmark against ChatGPT and GPT-4. It also supports voice input and output, allowing for natural conversations with users.

  • Official website

https://xinghuo.xfyun.cn/

2. API application

Enter the API test to apply, submit a work order and wait for review (iFlytek is very efficient and passes quickly). Then you can see the information in my work order

 Then click on the Spark Cognition Large Model to see various information about the API.

  • API real-time usage monitoring
  • API service interface authentication information
  • SDK and web calls for API

3. Spark Mobile Assistant

Using the Spark model on a mobile phone is very convenient for daily queries (in fact, there is a ready-made [iFlytek Spark APP] hahaha). Here we use the official Android SDK to compile an APK and use it directly on the mobile phone. We will consider using iFlytek’s voice in the future. Recognition and speech synthesis make the APP more convenient, but this is a story later.

Android SDK directory

-- Android SDK
├── ChatDemoProj													// 安卓Demo—Android Studio工程目录
│   ├── app
│   │   ├── build.gradle
│   │   ├── libs												    // sdk(AIKit.arr)包导入目录
│   │   ├── proguard-rules.pro
│   │   └── src
│   │       ├── androidTest											 
│   │       │   └── java
│   │       │       └── com
│   │       │           └── example
│   │       │               └── chatdemoproj
│   │       │                   └── ExampleInstrumentedTest.java
│   │       ├── main
│   │       │   ├── AndroidManifest.xml
│   │       │   ├── java
│   │       │   │   └── com
│   │       │   │       └── example
│   │       │   │           └── chatdemoproj
│   │       │   │               └── MainActivity.java					// sdk 演示Demo核心Activity
│   │       │   └── res
│   │       │       ├── drawable
│   │       │       │   └── ic_launcher_background.xml
│   │       │       ├── drawable-v24
│   │       │       │   └── ic_launcher_foreground.xml
│   │       │       ├── layout
│   │       │       │   └── activity_main.xml
│   │       │       ├── mipmap-anydpi-v26
│   │       │       │   ├── ic_launcher.xml
│   │       │       │   └── ic_launcher_round.xml
│   │       │       ├── mipmap-hdpi
│   │       │       │   ├── ic_launcher.webp
│   │       │       │   └── ic_launcher_round.webp
│   │       │       ├── mipmap-mdpi
│   │       │       │   ├── ic_launcher.webp
│   │       │       │   └── ic_launcher_round.webp
│   │       │       ├── mipmap-xhdpi
│   │       │       │   ├── ic_launcher.webp
│   │       │       │   └── ic_launcher_round.webp
│   │       │       ├── mipmap-xxhdpi
│   │       │       │   ├── ic_launcher.webp
│   │       │       │   └── ic_launcher_round.webp
│   │       │       ├── mipmap-xxxhdpi
│   │       │       │   ├── ic_launcher.webp
│   │       │       │   └── ic_launcher_round.webp
│   │       │       ├── values
│   │       │       │   ├── colors.xml
│   │       │       │   ├── strings.xml
│   │       │       │   └── themes.xml
│   │       │       └── values-night
│   │       │           └── themes.xml
│   │       └── test
│   │           └── java
│   │               └── com
│   │                   └── example
│   │                       └── chatdemoproj
│   │                           └── ExampleUnitTest.java
│   ├── build.gradle
│   ├── gradle
│   │   └── wrapper
│   │       ├── gradle-wrapper.jar
│   │       └── gradle-wrapper.properties
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── local.properties
│   └── settings.gradle
└── SDK
    └── AIKit.aar		

 What needs to be modified is part of the code in `MainActivity.java`. Fill in  the appId  ,  apiKey  ,  apiSecret  and adjust the demo working directory workDir according to the device conditions.

// 初始化SDK
AiHelper.getInst().setLogInfo(LogLvl.VERBOSE,1,"/sdcard/workDir/log.txt");
final AiHelper.Params.Builder params = AiHelper.Params.builder()
    .appId("")
    .apiKey("")
    .apiSecret("")
    .workDir("/sdcard/workDir");

Then it can be built.

4. Effect display

 

Guess you like

Origin blog.csdn.net/u014147522/article/details/132208144