- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Who Uses HiLens
- Procedures for Using HiLens
- Permissions Management
- Creating a Workspace
- Registering HiLens Kit Devices
- Managing Devices
- Developing Skills on the Console
- Using the Skill Market
- Managing Data
- Managing Products
- Caffe Operator Boundaries
- TensorFlow Operator Boundaries
- Best Practices
-
Developer Guide
- Before You Start
- HiLens Framework Introduction
- Initialization
- Video Input Module
- Audio Input Module
- Preprocessing Module
- Model Management Module
- Output Module
- EIServices Module
- Resource Management Module
-
Hard Example Upload Module
- Introduction to Hard Example Upload
- Initializing
- Determining a Hard Example Image in a Detection Algorithm
- Determining a Hard Example Image in a Classification Algorithm
- Uploading a Hard Example Image Set
- Obtaining Hard Example Configurations
- Updating Hard Example Configurations
- Example - Hard Example Upload
- Log Module
- Error Codes
- Change History
- SDK Reference
-
FAQs
-
FAQs
-
HiLens Kit Devices
-
Device Introduction
- What Are the Differences Between HiLens Kit and Atlas 500?
- What Are the Differences Between HiLens Kit and Atlas 200 DK?
- What Is HiLens Kit?
- What Is the Focal Length of a HiLens Kit Camera? Can It be Adjusted?
- What Cameras Can Be Connected to HiLens Kit?
- Can I Develop HiLens Kit Skills Using Compute Architecture for Neural Networks (CANN)?
-
Device Hardware Operations
- What Storage Devices Can Be Mounted to the USB Port of a HiLens Kit Device?
- What Does the Red Indicator of a HiLens Kit Device Mean?
- How Do I Restore HiLens Kit Devices to Factory Settings?
- Can HiLens Kit Connect to Multiple USB Cameras?
- Do I Need to Use Other Devices Together with HiLens Kit Devices?
- How Do I Quickly Switch a HiLens Kit Device to the Wireless Network Configuration Mode?
- Does HiLens Kit Support Infrared Interfaces?
-
Device System Operations
- How Do I Log In to a Device Using SSH?
- After I Change the Password for a Huawei HiLens Device, Why Can't I Use PuTTY to Log In to the Device Even Though I Can Use the New Password to Log in to Huawei HiLens IES?
- How Do I Perform Bottom-Layer Operations on the HiLens Kit System?
- Can I Import a Custom Python Module to a HiLens Kit Device?
- How Do I Install YUM on HiLens Kit Devices?
- How Do I Manage Device Files?
- How Do I Install Software Packages on HiLens Kit Devices?
- How Do I Log In to a Device as Root User and Disable Connection Timeout?
- Can Python-based OpenMV Devices Invoke HiLens Kit Skills by Calling APIs?
- Why a HiLens Kit Device Cannot Display Chinese Characters?
- How Do I Clear Wi-Fi Information Saved on a HiLens Kit Device?
- How Do I Use SSH Commands to Connect a HiLens Kit Device to a Wi-Fi Network?
- How Do I Configure Permanent DNS on a HiLens Kit Device?
-
Device Introduction
-
Device Registration
- How Do I Handle Device Registration Failures with Different Causes Returned?
- How Do I Check Whether a Huawei Cloud Account Is Bound to a Device?
- What Should I Do If I Can't Access the Huawei HiLens IES?
- What Should I Do If There Is Not Enough Quota for Device Registration?
- Why Do HiLens Kit Devices Fail to Connect to Wi-Fi?
- How Do I View the IP address of a Wireless Network?
- What Do I Do If the System Displays a Message Indicating that Only Firmware 1.0.3 or Later Can Be Registered When I Use Register a Device with the Intelligent Edge System?
- What Are the Differences Between Using IES and SSH to Register a HiLens Kit Device?
- What Do I Do If I Forgot the Password to the Huawei HiLens Intelligent Edge System?
-
Managing Devices
- What Should I Do If the Device Is Offline for More Than 5 Minutes After a Firmware Upgrade?
- Do I Need to Upgrade Firmware in Sequence?
- Why Does the Firmware Upgrade Fail When the Device Is Online?
- What Should I Do If the System Displays a Message Indicating That the Upgraded Version Must Be Later Than the Current Version During Firmware Upgrade?
- What Can I Do If a Device Alarm Is Reported Indicating That the Directory Space Is Full?
-
Skill Development
- What Are the Causes of Skill Creation Failures?
- What Models Does Huawei HiLens Support?
- How Do I Upload Models to Huawei HiLens?
- Can One Skill Use Multiple Models? How Do I Add Multiple Models When Developing a Skill?
- Why Does Skill Releasing Fail?
- Can Sockets Be Used During Skill Development?
- How Do I Handle a Model Conversion Failure?
- To What Devices Does the HiLens Framework SDK Apply?
- How Do I Determine the Input Tensor Shape During Model Conversion?
- Does Huawei HiLens Only Support Models Trained by ModelArts?
- Can Skills Developed on Huawei HiLens Be Deployed on Edge Servers That Use P4 GPUs?
-
Installing and Starting Skills
- What Are the Possible Causes for Skill Installation Failures?
- How Many Skills Can Run on a HiLens Kit Device Concurrently?
- Why Does a Skill Stop After Being Started?
- Can a HiLens Kit Device Run Skills Offline?
- What Can I Do If Skill A Is Successfully Started But Skill B Fails to Be Started When the Two Skills Purchased from the Skill Market Are Both Output by HDMI?
- Purchasing Skills
- Managing Products
-
Managing Data
- Why Is There No HDMI Skill Data on the Data Management Page?
- How Do I Configure the Data Storage Location (OBS Storage Path)?
- Why Does HDMI Black Screen Occur or HDMI Output Stop Working?
- Can I Record the Images Captured by a HiLens Kit Camera or the Skill Running Result for Storage?
- Why Don't the Logs Contain Any Device Data?
-
Algorithm Issues
- Why Is Error Code 17 Displayed During Model Inference?
- How Do I Use and Program the SDK or License of a Skill?
- Can a Huawei HiLens Skill Run on an Android or Arm Platform?
- What TensorFlow and Caffe Models Can Run on Huawei HiLens?
- Does Huawei HiLens Support Self-Developed Operators?
- What Language Does the Huawei HiLens Development Environment Support?
- Does HiLens Kit Provide an Interface that Converts a Color Image to a Grayscale Image?
- How Do I Configure Python Dependencies for a Skill?
-
Other
- Why Does the Huawei HiLens Console Keep Reporting 404 Errors?
- How Do I Assign Huawei HiLens Permissions to New IAM Users?
- Does Huawei HiLens Support 3D Object Recognition?
- What Can I Do If the System Displays a Message Indicating that the AK/SK Pair Is Unusable?
- What Devices Does Huawei HiLens Support?
-
HiLens Kit Devices
-
FAQs
- General Reference
Show all
Copied.
Constructing Audio Collectors
Local Audio File
Construct an audio collector. If the audio collector fails to be created, you can view skill logs or output to locate the fault. The local microphone uses the default parameters to collect data. The sampling rate is 44100, bit width is 16 bits, dual-channel collection is used, and the number of sampling points in each frame is 1024.
- API calling
1.0.8 or later
static std::shared_ptr<AudioCapture> hilens::AudioCapture::Create(const std::string filePath)
1.1.0 or later
static std::shared_ptr<AudioCapture> Create(const struct AudioProperties& property)
- Parameter description
Table 1 Parameters Parameter
Description
filePath
If the parameter is the absolute path of an audio file on the HiLens Kit device (Chinese characters are not supported), audio data is obtained from the file.
property
Local microphone recording parameter. The structure is defined as follows:
struct AudioProperties{ unsigned int enSamplerate; unsigned int enBitwidth; unsigned int u32PtNumPerFrm; unsigned int soundMode; }
The value range of each element is as follows:
- enSamplerate: sampling rate. The value can be 8000, 12000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 64000, or 96000.
- enBitwidth: bit width. The value is 1, indicating that the bit width is 16 bits.
- u32PtNumPerFrm: number of sampling points in each frame. The value range is [80, 2048].
- soundMode: audio channel mode. The value can be 0 (mono-channel) or 1 (dual-channel).
NOTE:
- The values of u32PtNumPerFrm and enSamplerate determine the frequency of hardware interrupts. If the frequency is too high, the system performance is affected and other services are affected. It is recommended that the values of u32PtNumPerFrm and enSamplerate meet the following formula: (u32PtNumPerFrm x 1,000)/enSamplerate >= 10. For example, when enSamplerate is 16000, it is recommended that u32PtNumPerFrm be greater than or equal to 160.
- There is only one local microphone. Different recording parameters cannot be set for multiple processes. The parameters set earlier take effect. If the parameter settings are different, the setting fails.
- This API and the API in Playing an Audio File cannot be called at the same time.
- Return Value
If the operation is successful, an audio collector instance is returned. If the operation fails, nullptr is returned.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot