सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Leopard Flutter एक Flutter प्लगइन है जो Picovoice के Leopard स्पीच-टू-टेक्स्ट इंजन को एकीकृत करता है, जिससे Flutter एप्लिकेशन में सटीक, डिवाइस पर स्पीच रिकग्निशन संभव होता है। यह निम्न लेटेंसी और उच्च सटीकता के साथ रियल-टाइम ट्रांसक्रिप्शन समर्थित करता है, जो वॉयस असिस्टेंट और हैंड्स-फ्री इंटरफेस के लिए आदर्श है। इंजन पूरी तरह से डिवाइस पर चलता है, जिससे गोपनीयता और ऑफलाइन कार्यक्षमता सुनिश्चित होती है। Android और iOS के साथ संगत है, बिना क्लाउड सेवाओं पर निर्भर हुए मोबाइल एप्लिकेशन में इसकी एकीकरण को सरल बनाता है।
उपयोग
वॉइस कंट्रोल्ड मोबाइल ऐप्स
ऑफलाइन बोली ट्रांसक्रिप्शन
गोपनीयता-केंद्रित वॉइस सहायक
रियल-टाइम डिक्टेशन टूल्स
आवाज़ के माध्यम से स्मार्ट होम नियंत्रण
मुख्य विशेषताएँ
डिवाइस-पर बोलने का पहचान
कम देरी प्रसंस्करण
उच्च सटीकता ट्रांसक्रिप्शन
कई भाषाओं का समर्थन करता है
इंटरनेट की आवश्यकता नहीं है
इनके लिए उपयुक्त
आवाज-प्रथम एप्लिकेशन बना रहे विकासकर्मी
डेटा गोपनीयता की आवश्यकता वाले ऐप्स
ऑफलाइन-क्षम एप्लिकेशन
Android और iOS के लिए मोबाइल प्लेटफॉर्म
विचार योग्य बातें
एप्लिकेशन के साथ मॉडल फ़ाइलों को बंडल करने की आवश्यकता है
समर्थित भाषाओं तक सीमित
मूल बोलने वाले API की तुलना में अधिक मेमोरी उपयोग
प्रारंभिक सेटअप मॉडल कॉन्फ़िगरेशन शामिल होता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
AccessKey is your authentication and authorization token for deploying Picovoice SDKs, including Leopard. Anyone who is
using Picovoice needs to have a valid AccessKey. You must keep your AccessKey secret. You would need internet
connectivity to validate your AccessKey with Picovoice license servers even though the voice recognition is running 100%
offline.
AccessKey also verifies that your usage is within the limits of your account. You can see your usage limits and real-time usage on your Picovoice Console Profile. To continue using Picovoice after your trial or renew and adjust your usage limits, please reach out to our Enterprise Sales Team or your existing Picovoice contact.
Language Support
English, French, German, Italian, Japanese, Korean, Portuguese, and Spanish.
./demo/c/build/leopard_demo -a ${ACCESS_KEY} -l ${LIBRARY_PATH} -m ${MODEL_FILE_PATH}${AUDIO_FILE_PATH}
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${LIBRARY_PATH} with the path to appropriate
library under lib, ${MODEL_FILE_PATH} to path to default model file
(or your custom one), and ${AUDIO_FILE_PATH} with a path to an audio file you wish to transcribe.
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console and ${AUDIO_FILE_PATH} with a path to an audio file you
wish to transcribe.
For more information about Node.js demos go to demo/nodejs.
Flutter Demo
To run the Leopard demo on Android or iOS with Flutter, you must have the Flutter SDK installed on your system. Once installed, you can run flutter doctor to determine any other missing requirements for your relevant platform. Once your environment has been set up, launch a simulator or connect an Android/iOS device.
Run the prepare_demo script from demo/flutter with a language code to set up the demo in the language of your choice (e.g. de -> German, ko -> Korean). To see a list of available languages, run prepare_demo without a language code.
dart scripts/prepare_demo.dart ${LANGUAGE}
Replace "${YOUR_ACCESS_KEY_HERE}" in the file main.dart with your AccessKey.
Run the following command from demo/flutter to build and deploy the demo to your device:
flutter run
React Native Demo
To run the React Native Leopard demo app you will first need to set up your React Native environment. For this,
please refer to React Native's documentation. Once your environment has
been set up, navigate to demo/react-native/LeopardDemo/src to run the following commands:
For Android:
yarn android-install # sets up environment
yarn android-run ${LANGUAGE}# builds and deploys to Android
For iOS:
yarn ios-install # sets up environment
yarn ios-run ${LANGUAGE}# builds and deploys to iOS
Java Demo
The Leopard Java demo is a command-line application that lets you choose between running Leopard on an audio file or on microphone input.
From demo/java run the following commands from the terminal to build and run the file demo:
cd demo/java
./gradlew build
cd build/libs
java -jar leopard-file-demo.jar -a ${ACCESS_KEY} -i ${AUDIO_FILE_PATH}
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console and ${AUDIO_FILE_PATH} with a path to an audio file you wish to transcribe.
For more information about Java demos go to demo/java.
.NET Demo
Leopard .NET demo is a command-line application that lets you choose between running Leopard on an audio
file or on real-time microphone input.
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console and
${AUDIO_FILE_PATH} to path an audio file. Finally, when done be sure to explicitly release the resources using
leopard.delete().
C
Create an instance of the engine and transcribe an audio file:
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${MODEL_FILE_PATH} to path to
default model file (or your custom one), and ${AUDIO_FILE_PATH} to path an audio file.
Finally, when done be sure to release resources acquired using pv_leopard_delete(leopard).
iOS
The Leopard iOS binding is available via CocoaPods. To import it into your iOS project, add the following line to your Podfile and run pod install:
pod 'Leopard-iOS'
Create an instance of the engine and transcribe an audio_file:
import Leopard
let modelPath = Bundle(for: type(of: self)).path(
forResource: "${MODEL_FILE}", // Name of the model file name for Leopard
ofType: "pv")!
let leopard = Leopard(accessKey: "${ACCESS_KEY}", modelPath: modelPath)
do {
let audioPath = Bundle(for: type(of: self)).path(forResource: "${AUDIO_FILE_NAME}", ofType: "${AUDIO_FILE_EXTENSION}")
let result = leopard.process(audioPath)
print(result.transcript)
} catch let error as LeopardError {
} catch { }
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${MODEL_FILE} a custom trained model from console or the default model, ${AUDIO_FILE_NAME} with the name of the audio file and ${AUDIO_FILE_EXTENSION} with the extension of the audio file.
Android
To include the package in your Android project, ensure you have included mavenCentral() in your top-level build.gradle file and then add the following to your app's build.gradle:
Create an instance of the engine and transcribe an audio file:
import ai.picovoice.leopard.*;
final String accessKey = "${ACCESS_KEY}"; // AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
final String modelPath = "${MODEL_FILE_PATH}";
try {
Leopard leopard = new Leopard.Builder()
.setAccessKey(accessKey)
.setModelPath(modelPath)
.build(appContext);
File audioFile = new File("${AUDIO_FILE_PATH}");
LeopardTranscript transcript = leopard.processFile(audioFile.getAbsolutePath());
} catch (LeopardException ex) { }
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${MODEL_FILE_PATH} with a custom trained model from console or the default model, and ${AUDIO_FILE_PATH} with the path to the audio file.
Node.js
Install the Node.js SDK:
yarn add @picovoice/leopard-node
Create instances of the Leopard class:
constLeopard = require("@picovoice/leopard-node");
const accessKey = "${ACCESS_KEY}"// Obtained from the Picovoice Console (https://console.picovoice.ai/)let leopard = newLeopard(accessKey);
const result = engineInstance.processFile('${AUDIO_FILE_PATH}');
console.log(result.transcript);
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console and
${AUDIO_FILE_PATH} to path an audio file.
When done, be sure to release resources using release():
Replace ${ACCESS_KEY} with your AccessKey obtained from Picovoice Console, ${MODEL_FILE_PATH} with a custom trained model from Picovoice Console or the default model, and ${AUDIO_FILE_PATH} with the path to the audio file.
React Native
The Leopard React Native binding is available via NPM.
Add it via the following command:
yarn add @picovoice/leopard-react-native
Create an instance of the engine and transcribe an audio file:
Replace ${ACCESS_KEY} with your AccessKey obtained from Picovoice Console, ${MODEL_FILE_PATH} with a custom trained model from Picovoice Console or the default model and ${AUDIO_FILE_PATH} with the absolute path of the audio file.
When done be sure to explicitly release the resources using leopard.delete().
Java
The latest Java bindings are available from the Maven Central Repository at:
ai.picovoice:leopard-java:${version}
Create an instance of the engine with the Leopard Builder class and transcribe an audio file:
import ai.picovoice.leopard.*;
final String accessKey = "${ACCESS_KEY}";
try {
Leopard leopard = new Leopard.Builder().setAccessKey(accessKey).build();
LeopardTranscript result = leopard.processFile("${AUDIO_FILE_PATH}");
leopard.delete();
} catch (LeopardException ex) { }
System.out.println(result.getTranscriptString());
Replace ${ACCESS_KEY} with yours obtained from Picovoice Console and ${AUDIO_FILE_PATH} to the path an audio file. Finally, when done be sure to explicitly release the resources using leopard.delete().
.NET
Install the .NET SDK using NuGet or the dotnet CLI:
dotnet add package Leopard
Create an instance of the engine and transcribe an audio file: