code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_os.h"
#include "uvoice_common.h"
int32_t uvoice_ringbuff_reset(uvoice_ringbuff_t *rb)
{
if (!rb) {
M_LOGE("rb null !\n");
return -1;
}
rb->rd_pt... | YifuLiu/AliOS-Things | components/uvoice/common/ringbuffer.c | C | apache-2.0 | 5,421 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
static char dec2hex(char c)
{
if (0 <= c && c <= 9) {
return c + '0';
} else {
if( 10 <= c && c <= 15 ) {
return c + 'A'... | YifuLiu/AliOS-Things | components/uvoice/common/urlencode.c | C | apache-2.0 | 1,155 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <stdlib.h>
#include "uvoice_os.h"
#include "uvoice_ws.h"
#include "nopoll.h"
#include "lwip/netif.h"
#ifdef UVOICE_ON_BK7251
#define NOPOLL... | YifuLiu/AliOS-Things | components/uvoice/connect/uvoice_ws.c | C | apache-2.0 | 21,830 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_WS_H__
#define __UVOICE_WS_H__
typedef enum {
WS_BIN_DATA_START,
WS_BIN_DATA_CONTINUE,
WS_BIN_DATA_FINISH,
} ws_bin_type_t;
typedef struct {
void (*connect_cb)(void);
void (*disconnect_cb)(void);
void (*recv_text_cb)(cha... | YifuLiu/AliOS-Things | components/uvoice/connect/uvoice_ws.h | C | apache-2.0 | 1,125 |
/*
* Copyright (C) 2015-2019 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "k_api.h"
#if AOS_COMP_CLI
#include "aos/cli.h"
#endif
#include "uvoice_init.h"
#include "uvoice_test.h"
static void cmd_play_handler(char *buf, int len, int argc,... | YifuLiu/AliOS-Things | components/uvoice/example/uvoice_example.c | C | apache-2.0 | 1,427 |
#!/usr/bin/env python
import os, sys
print("the script is " + sys.argv[0])
print("current dir is " + os.getcwd())
cur_dir = os.getcwd()
script_dir = sys.path[0]
script1_dir = os.path.join(script_dir, "codec", "opensource", "pvaac")
script2_dir = os.path.join(script_dir, "codec", "opensource", "pvmp3")
os.chdir(script... | YifuLiu/AliOS-Things | components/uvoice/get_open_source.py | Python | apache-2.0 | 690 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_EVENT_H__
#define __UVOICE_EVENT_H__
/** @defgroup uvoice_event_api uvoice_event
* @ingroup uvoice_aos_api
* @{
*/
#define UVOICE_EV_PLAYER 0x0111
#define UVOICE_CODE_PLAYER_STATE 1
#define UVOICE_CODE_PALYER_CACHE_CPLT 2
#defin... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_event.h | C | apache-2.0 | 1,118 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_INIT_H__
#define __UVOICE_INIT_H__
/** @defgroup uvoice_init_api uvoice_init
* @ingroup uvoice_aos_api
* @{
*/
/**
* Init the uvoice module.
*
* @retrun 0 on success, otherwise will be failed.
*/
int uvoice_init(void);
/**
* D... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_init.h | C | apache-2.0 | 474 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __UVOICE_MLIST_H__
#define __UVOICE_MLIST_H__
/** @defgroup uvoice_mlist_api uvoice_mlist
* @ingroup uvoice_aos_api
* @{
*/
/**
* 显示播放列表
*
* @retrun 成功返回0,失败返回非0.
*/
int mlist_source_show(void);
/**
* 扫描本地音频文件,更新播放列表
*
* @retrun ... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_mlist.h | C | apache-2.0 | 1,434 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __UVOICE_PLAYER_H__
#define __UVOICE_PLAYER_H__
#include "uvoice_types.h"
/** @defgroup uvoice_player_api uvoice_player
* @ingroup uvoice_aos_api
* @{
*/
/** @brief 播放状态 */
typedef enum {
PLAYER_STAT_IDLE = 0,
PLAYER_STAT_READY,
... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_player.h | C | apache-2.0 | 2,650 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __UVOICE_RECORDER_H__
#define __UVOICE_RECORDER_H__
#include "uvoice_types.h"
/** @defgroup uvoice_recoder_api uvoice_recoder
* @ingroup uvoice_aos_api
* @{
*/
/** @brief 录音状态 */
typedef enum {
RECORDER_STAT_IDLE = 0,
RECORDER_STAT_REA... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_recorder.h | C | apache-2.0 | 1,402 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_TEST_H__
#define __UVOICE_TEST_H__
/** @defgroup uvoice_test_api uvoice_test
* @ingroup uvoice_aos_api
* @{
*/
/**
* 播放测试
*
*/
void uvoice_play_test(int argc, char **argv);
/**
* 录音测试
*
*/
void uvoice_record_test(int argc, ch... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_test.h | C | apache-2.0 | 561 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_TYPES_H__
#define __UVOICE_TYPES_H__
/** @defgroup uvoice_aos_api uvoice
* @{
*/
/**
* @}
*/
/** @defgroup uvoice_types_api uvoice_types
* @ingroup uvoice_aos_api
* @ingroup uvoice_aos_api
* @{
*/
typedef enum {
MEDIA_FM... | YifuLiu/AliOS-Things | components/uvoice/include/uvoice_types.h | C | apache-2.0 | 1,437 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_ALIOS_H__
#define __UVOICE_ALIOS_H__
#include <stdarg.h>
#include <k_api.h>
#include <aos/kernel.h>
#include <aos/errno.h>
#include <aos/kv.h>
#include <aos/vfs.h>
#include <aos/list.h>
#ifdef AOS_LOOP
#include <aos/yloop.h>
#endif
#inc... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_alios.h | C | apache-2.0 | 10,925 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_AMP_H__
#define __UVOICE_AMP_H__
#include "amp_platform.h"
#include "amp_kv.h"
#include "amp_fs.h"
#include "amp_defines.h"
#include "amp_system.h"
#include "wrappers_defs.h"
typedef void *os_dir_t;
typedef void *os_dirent_t;
typedef v... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_amp.h | C | apache-2.0 | 7,872 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_AOS_H__
#define __UVOICE_AOS_H__
#include <fcntl.h>
#include "aos/kv.h"
#include "aos/vfs.h"
#include <aos/kernel.h>
typedef aos_dir_t os_dir_t;
typedef aos_dirent_t os_dirent_t;
typedef int os_file_t;
typedef aos_queue_t os_message_qu... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_aos.h | C | apache-2.0 | 6,875 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_AUDIO_H__
#define __UVOICE_AUDIO_H__
#define VOLUME_LEVEL_MIN 0
#define VOLUME_LEVEL_MAX 10
typedef enum {
SND_DEVICE_NONE = 0,
SND_DEVICE_MIN = SND_DEVICE_NONE,
SND_DEVICE_OUT_BEGIN,
SND_DEVICE_OUT_SPEAKER = SND_... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_audio.h | C | apache-2.0 | 2,663 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_CODEC_H__
#define __UVOICE_CODEC_H__
int wave_encoder_create(media_encoder_t *mencoder);
int wave_encoder_release(media_encoder_t *mencoder);
int wave_decoder_create(media_decoder_t *mdecoder);
int wave_decoder_release(media_decoder_t *... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_codec.h | C | apache-2.0 | 1,855 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#ifndef __UVOICE_COMMON_H__
#define __UVOICE_COMMON_H__
typedef enum {
MEDIA_TYPE_UNKNOWN = 0,
MEDIA_TYPE_FILE,
MEDIA_TYPE_HTTP,
MEDIA_TYPE_FLASH,
MEDIA_TYPE_MEM,
MEDIA_TYPE_STREAM,
... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_common.h | C | apache-2.0 | 664 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_CONFIG_H__
#define __UVOICE_CONFIG_H__
/* cache type select
* 0 - no cache
* 1 - cache to file (fs required)
* 2 - cache to memory
*/
#define PLAYER_CACHE_TYPE 2
#ifdef __os_linux__
/* set file path for cache type 1 */
#define PLA... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_config.h | C | apache-2.0 | 1,668 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_FORMAT_H__
#define __UVOICE_FORMAT_H__
int mp3_id3v1_parse(media_info_t *info, unsigned char *data, int size);
int format_parse_byname(char *name, media_format_t *format);
bool wav_format_check(char *buffer, int size);
bool mp3_format_c... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_format.h | C | apache-2.0 | 711 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_LINUX_H__
#define __UVOICE_LINUX_H__
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/i... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_linux.h | C | apache-2.0 | 8,223 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_LIST_H__
#define __UVOICE_LIST_H__
typedef struct uvoice_list {
struct uvoice_list *prev;
struct uvoice_list *next;
} uvoice_list_t;
#define UVOICE_LIST_INIT(list) \
{&(list), &(list)}
#define uvoice_list_for_each_entry(head,... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_list.h | C | apache-2.0 | 1,833 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_MESSAGE_H__
#define __UVOICE_MESSAGE_H__
typedef struct {
char *filename;
int id;
int qid;
int recv_waiting;
os_sem_t recv_sem;
os_mutex_t lock;
} uvoice_msgqueue_t;
int uvoice_msgqueue_recv(uvoice_msgqueue_t *msgqueue, int type,... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_message.h | C | apache-2.0 | 604 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_OS_H__
#define __UVOICE_OS_H__
#ifndef __os_linux__
#define __os_alios_things__
#endif
#ifndef MIN
#define MIN(a,b) ((a)<(b) ? (a):(b))
#endif
#ifndef MAX
#define MAX(a,b) ((a)>(b) ? (a):(b))
#endif
#ifndef ARRAY_SIZE
#define ARRAY_SIZ... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_os.h | C | apache-2.0 | 1,036 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_PCM_H__
#define __UVOICE_PCM_H__
/*
* Set volume.
*
* Return:
* 0 -- success or unsupport
* -1 -- failed
*/
int uvoice_set_volume(snd_device_t device, int volume);
/*
* Select audio output/input device, return 0 if device sw... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_pcm.h | C | apache-2.0 | 2,107 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_PLAY_H__
#define __UVOICE_PLAY_H__
typedef enum {
PLAYER_MSG_PCM_INFO = 0,
PLAYER_MSG_MEDIA_INFO,
PLAYER_MSG_SEEK_DONE,
PLAYER_MSG_LOAD_BLOCK,
} player_message_t;
typedef enum {
STREAM_MGR_STAT_IDLE = 0,
STREAM_MGR_STAT_READY,
S... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_play.h | C | apache-2.0 | 4,607 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_RECORD_H__
#define __UVOICE_RECORD_H__
typedef enum {
RECORDER_CLOSE = 0,
RECORDER_PAUSE,
RECORDER_RESUME,
RECORDER_START,
RECORDER_STOP,
RECORDER_UPDATE_HEAD,
} recorder_action_t;
typedef struct {
media_type_t type;
uint32_t s... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_record.h | C | apache-2.0 | 1,974 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_RESAMPLER_H__
#define __UVOICE_RESAMPLER_H__
int uvoice_resampler_process(void *resampler, uint8_t *input, int input_len, uint8_t **output, int *output_len);
int uvoice_resampler_update(void *resampler, int src_rate, int dst_rate, int c... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_resampler.h | C | apache-2.0 | 525 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_RINGBUFFER_H__
#define __UVOICE_RINGBUFFER_H__
int32_t uvoice_ringbuff_reset(uvoice_ringbuff_t *rb);
int32_t uvoice_ringbuff_init(uvoice_ringbuff_t *rb, uint8_t *buffer, int32_t size);
int32_t uvoice_ringbuff_freesize(uvoice_ringbuff_t ... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_ringbuffer.h | C | apache-2.0 | 725 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#ifndef __UVOICE_EXTRACTOR_H__
#define __UVOICE_EXTRACTOR_H__
int file_loader_create(media_loader_t *mloader, char *source);
int file_loader_release(media_loader_t *mloader);
int file_packer_create(media_packer_t *mpacker, char *sink);
int file_packer_r... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_stream.h | C | apache-2.0 | 749 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __UVOICE_WAVE_H__
#define __UVOICE_WAVE_H__
#define ID_RIFF 0x46464952 /* 'F' 'F' 'I' 'R' */
#define ID_WAVE 0x45564157 /* 'E' 'V' 'A' 'W' */
#define ID_FMT 0x20746d66 /* ' ' 't' 'm' 'f' */
#define ID_DATA 0x61746164 /* 'a' 't' 'a' 'd' */... | YifuLiu/AliOS-Things | components/uvoice/internal/uvoice_wave.h | C | apache-2.0 | 1,365 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include "uvoice_os.h"
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_config.h"
#include "uvoice_co... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_codec.c | C | apache-2.0 | 14,156 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdlib.h>
#include <stdint.h>
int fade_out_proc_8bit(uint8_t *buffer, int nbytes,
int *pos, int scope, int channels)
{
char *ptr = (char *)buffer;
int sample_pos = *pos;
int samples;
int sample_index;
int channel_index;
double sample... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_fade.c | C | apache-2.0 | 2,748 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include "uvoice_os.h"
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_common.h"
#include "uvoice_pl... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_format.c | C | apache-2.0 | 9,454 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include "uvoice_os.h"
#include "uvoice_types.h"
#include "uvoice_mlist.h"
#include "uvoice_config.h"
#define SOURCE_LIST_INDEX_KE... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_mlist.c | C | apache-2.0 | 10,938 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include <signal.h>
#include <errno.h>
#include "uvoice_types.h"
#include "uvoice_event.h"
#include "uvoice_player.h"
#include "uvoice_os.h"
#include "... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_player.c | C | apache-2.0 | 116,712 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_types.h"
#include "uvoice_event.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
#include "uvoice_config.h"
#include "uvoice_common.h"
#include "uvo... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_recorder.c | C | apache-2.0 | 29,659 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_os.h"
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_config.h"
#include "uvoice_common.h"
#include "uv... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_stream.c | C | apache-2.0 | 3,765 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
#include "uvoice_common.h"
#include "uvoice_pl... | YifuLiu/AliOS-Things | components/uvoice/media/uvoice_wave.c | C | apache-2.0 | 8,750 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_os.h"
#include "uvoice_config.h"
#include "uvoice_common.h"
#include "uvoice_ringbuffer.h"
#include "... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_cache.c | C | apache-2.0 | 31,809 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __NET_CACHE_H__
#define __NET_CACHE_H__
enum cache_type {
CACHE_NONE = 0,
CACHE_FILE,
CACHE_MEM,
};
enum cache_event {
CACHE_EV_CACHE_CPLT = 0,
CACHE_EV_SEEK_DONE,
CACHE_EV_READ_BLOCK,
};
struct cache_file {
os_file_t fp;
uint32_t w... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_cache.h | C | apache-2.0 | 1,838 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_os.h"
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_config.h"
#include "uvoice_common.h"
#include "uvoice_play.h"
#include "uvoic... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_download.c | C | apache-2.0 | 5,413 |
#ifndef __NET_DOWNLOAD_H__
#define __NET_DOWNLOAD_H__
int net_download_work(net_cache_t *nc);
int new_download_abort(net_cache_t *nc);
net_cache_t *net_download_create(void);
int net_download_release(net_cache_t *nc);
#endif
| YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_download.h | C | apache-2.0 | 229 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
#include "uvoice_common.h"
#include "uvoice_play.h"
#include "uvoi... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_file.c | C | apache-2.0 | 18,379 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_os.h"
#include "uvoice_common.h"
#include "uvoice_play.h"
#include "uvoice_cache.h"
#include "uvoice... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_hls.c | C | apache-2.0 | 25,457 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __HLS_H__
#define __HLS_H__
static int hls_index_get(char *desc);
int uvoice_hls_index_update(http_loader_t *loader, int index);
int uvoice_hls_file_next(http_loader_t *loader);
int uvoice_hls_build(http_loader_t *loader);
int uvoice_hls_rele... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_hls.h | C | apache-2.0 | 373 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#ifdef __os_alios_things__
#include <sys/socket.h>
#include <netdb.h>
#elif defined(__os_linux__)
#include <sys/socket.h>
#include <arpa/inet.h>
#include... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_http.c | C | apache-2.0 | 52,437 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __HTTP_LOAD_H__
#define __HTTP_LOAD_H__
#ifdef VOICELOUDER_APP
#define HTTP_URL_LEN 1024
#else
#define HTTP_URL_LEN 512
#endif
#define HTTP_HOSTNAME_LEN HTTP_URL_LEN
#define HTTP_STAT_SUCCESS 200
#define HTTP_CODE_BREAKPOINT 206... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_http.h | C | apache-2.0 | 1,464 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_types.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
#include "uvoice_common.h"
#include "uvoice_play.h"
#include "uvoi... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_partition.c | C | apache-2.0 | 15,349 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "uvoice_os.h"
#ifndef LINKKIT_SSL_ENABLE
#include "mbedtls/config.h"
#include "mbedtls/error.h"
#include "mbedtls/ssl.h"
#include "mbedtls/net.h"
#include "mbedtls/... | YifuLiu/AliOS-Things | components/uvoice/stream/uvoice_ssl.c | C | apache-2.0 | 19,098 |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_init.h"
#include "uvoice_event.h"
extern void uvoice_play_test(int argc, char **argv);
extern void uvoice_record_test(int argc, char **argv);
extern void test_tts_handle(int argc, char **argv);
static... | YifuLiu/AliOS-Things | components/uvoice/test/test_main.c | C | apache-2.0 | 2,075 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "uvoice_types.h"
#include "uvoice_event.h"
#include "uvoice_player.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
static os_task_t play... | YifuLiu/AliOS-Things | components/uvoice/test/test_player.c | C | apache-2.0 | 17,168 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "uvoice_types.h"
#include "uvoice_recorder.h"
#include "uvoice_os.h"
#define APP_LOGI(fmt, ...) printf("%s: "fmt, __func__, ##__VA_ARGS__)
... | YifuLiu/AliOS-Things | components/uvoice/test/test_recorder.c | C | apache-2.0 | 4,333 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef AOS_NETMGR
#include "netmgr.h"
#endif
#include "uvoice_swid.h"
#define SOUND_SSID_FLOW_DISCONNECTED 0
#define SOUND_SSID_FLOW_MONITOR 1
#define SOUND_SSID_FLOW_CO... | YifuLiu/AliOS-Things | components/uvoice/test/test_swid.c | C | apache-2.0 | 1,981 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "uvoice_types.h"
#include "uvoice_tts.h"
#include "../internal/uvoice_os.h"
#define APP_LOGI(fmt, ...) printf("%s: "fmt, __func__, ##__VA_ARGS... | YifuLiu/AliOS-Things | components/uvoice/test/test_tts.c | C | apache-2.0 | 3,676 |
# -*- coding: utf-8 -*-
import os
import sys
import math
import wave
import struct
import numpy as np
max_volume = 0.85
max_short = 32767
min_short = -32768
sample_rate = 16000
min_freq = 1700
max_freq = 1700 + 96 * 50 + 100
freq_inc = 50
time_inc = 0.1
def gen_voice_freq(freq, times):
unit_sample = int(sample_r... | YifuLiu/AliOS-Things | components/uvoice/tools/gen_voice.py | Python | apache-2.0 | 2,331 |
/*
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "uvoice_os.h"
int uvoice_event_init(void);
int audio_device_init(void);
int uvoice_init(void)
{
if (uvoice_event_init()) {
M_LOGE("init uvoice event failed !... | YifuLiu/AliOS-Things | components/uvoice/uvoice.c | C | apache-2.0 | 607 |
/*
* Copyright (C) 2015-2021 Alibaba Group Holding Limited
*/
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include "vfs_types.h"
#include "vfs_api.h"
#if AOS_COMP_CLI
#include "aos/cli.h"
#endif
static int32_t driver_vfs_open(vfs_file_... | YifuLiu/AliOS-Things | components/vfs/example/vfs_example.c | C | apache-2.0 | 3,633 |
/**
* @file vfs.h
* @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#ifndef AOS_VFS_H
#define AOS_VFS_H
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup aos_vfs VF... | YifuLiu/AliOS-Things | components/vfs/include/aos/vfs.h | C | apache-2.0 | 22,780 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_ADAPT_H
#define VFS_ADAPT_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Create OS lock
*
* @return the pointer of the lock
*
*/
void *vfs_lock_create(void);
/**
* @brief Free OS lock
*
* @param[in] lock pointer to the os loc... | YifuLiu/AliOS-Things | components/vfs/include/vfs_adapt.h | C | apache-2.0 | 1,107 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_API_H
#define VFS_API_H
#define VFS_OK 0
#define VFS_ERR_NOMEM -10000
#define VFS_ERR_INVAL -10001
#define VFS_ERR_NOENT -10002
#define VFS_ERR_NAMETOOLONG -10003
#define VFS_ERR_NOSYS -10004
#define VFS_... | YifuLiu/AliOS-Things | components/vfs/include/vfs_api.h | C | apache-2.0 | 12,725 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_CONF_H
#define VFS_CONF_H
#ifndef VFS_CONFIG_DEVICE_NODES
#define VFS_DEVICE_NODES 25
#else
#define VFS_DEVICE_NODES VFS_CONFIG_DEVICE_NODES
#endif
#ifndef VFS_CONFIG_FD_OFFSET
#define VFS_FD_OFFSET 48
#else
#define VFS_FD_OFFSET VFS_CONFIG_... | YifuLiu/AliOS-Things | components/vfs/include/vfs_conf.h | C | apache-2.0 | 934 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_FILE_H
#define VFS_FILE_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Get the file descriptor by file structure
*
* @param[in] file pointer the file structure
*
* @return the file descriptor
*
*/
int32_t vfs_fd_get(vfs_file_t ... | YifuLiu/AliOS-Things | components/vfs/include/vfs_file.h | C | apache-2.0 | 1,731 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_INODE_H
#define VFS_INODE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "vfs_types.h"
enum {
VFS_TYPE_NOT_INIT,
VFS_TYPE_CHAR_DEV,
VFS_TYPE_BLOCK_DEV,
VFS_TYPE_FS_DEV
};
#define INODE_IS_TYPE(node, t) ((node)->type == (... | YifuLiu/AliOS-Things | components/vfs/include/vfs_inode.h | C | apache-2.0 | 3,810 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef VFS_TYPES_H
#define VFS_TYPES_H
#include <stdint.h>
#include <time.h>
typedef struct {
time_t actime; /* time of last access */
time_t modtime; /* time of last modification */
} vfs_utimbuf_t;
typedef struct {
uint16_t st_mode; ... | YifuLiu/AliOS-Things | components/vfs/include/vfs_types.h | C | apache-2.0 | 5,438 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <aos/errno.h>
#include "vfs_types.h"
#include "vfs_api.h"
#include "vfs_conf.h"
#include "vfs_inode.h"
#include "vfs_file.h... | YifuLiu/AliOS-Things | components/vfs/vfs.c | C | apache-2.0 | 48,682 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdint.h>
#include "k_api.h"
#include "vfs_adapt.h"
void *vfs_lock_create(void)
{
int32_t ret;
kmutex_t *m;
m = krhino_mm_alloc(sizeof(kmutex_t));
if (m == NULL) {
return NULL;
}
ret = krhino_mutex_create(m... | YifuLiu/AliOS-Things | components/vfs/vfs_adapt.c | C | apache-2.0 | 1,225 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <string.h>
#include "aos/vfs.h"
#include "aos/errno.h"
#include "vfs_types.h"
#include "vfs_api.h"
static int _vfs_to_aos_res(int res)
{
switch (res) {
case VFS_OK:
return 0;
case VFS_ERR_NOMEM:
retu... | YifuLiu/AliOS-Things | components/vfs/vfs_aos.c | C | apache-2.0 | 4,764 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include "vfs_types.h"
#include "vfs_conf.h"
#include "vfs_file.h"
static vfs_file_t g_files[VFS_MAX_FILE_NUM];
static uint32_t g_opened_fd_bitmap[(VFS_MAX_FILE_NUM + 31) / 32];
extern void ... | YifuLiu/AliOS-Things | components/vfs/vfs_file.c | C | apache-2.0 | 3,356 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include "vfs_types.h"
#include "vfs_api.h"
#include "vfs_conf.h"
#include "vfs_inode.h"
#include "vfs_adapt.h"
static vfs_inode_t g_vfs_nodes[VFS_DEVICE... | YifuLiu/AliOS-Things | components/vfs/vfs_inode.c | C | apache-2.0 | 10,991 |
/*
* Copyright (c) 2014 - 2016 Kulykov Oleh <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/example/websocket_example.c | C | apache-2.0 | 12,143 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/librws.h | C | apache-2.0 | 13,934 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_common.h | C | apache-2.0 | 2,052 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_error.h | C | apache-2.0 | 1,554 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_frame.h | C | apache-2.0 | 2,709 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_list.h | C | apache-2.0 | 1,693 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_memory.h | C | apache-2.0 | 1,493 |
/*
* Copyright (C) 2019-2020 Alibaba Group Holding Limited
*/
#ifndef __NETWORK_H__
#define __NETWORK_H__
#include <sys/socket.h>
#include <arpa/inet.h>
#include <lwip/netdb.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct network {
int fd;
struct sockaddr_in address;
int (*net_connect)(struct... | YifuLiu/AliOS-Things | components/websocket/include/rws_network.h | C | apache-2.0 | 632 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_socket.h | C | apache-2.0 | 6,597 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_string.h | C | apache-2.0 | 1,842 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/include/rws_thread.h | C | apache-2.0 | 1,261 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/librws.c | C | apache-2.0 | 1,201 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_common.c | C | apache-2.0 | 1,205 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_error.c | C | apache-2.0 | 2,141 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_frame.c | C | apache-2.0 | 9,513 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_list.c | C | apache-2.0 | 1,826 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_memory.c | C | apache-2.0 | 1,672 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_socketpriv.c | C | apache-2.0 | 37,582 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_socketpub.c | C | apache-2.0 | 10,205 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_string.c | C | apache-2.0 | 1,695 |
/*
* Copyright (c) 2014 - 2019 Oleh Kulykov <info@resident.name>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
*... | YifuLiu/AliOS-Things | components/websocket/src/rws_thread.c | C | apache-2.0 | 5,215 |
/* The standard CSS for doxygen 1.9.1 */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}
p.reference, p.definition {
font: 400 14px/22px Roboto,sans-serif;
}
/* @group Heading Levels */
h1.groupheader {
font-size: 150%;
}
.title {
font: 400 14px/28px Roboto,sans-serif;
font-size: 150%;... | YifuLiu/AliOS-Things | documentation/doxygen/style/doxygen-custom.css | CSS | apache-2.0 | 34,020 |
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="haas-site-footer"></div>
<!--END GENERATE_TREEVIEW-->
</body>
</html>
| YifuLiu/AliOS-Things | documentation/doxygen/style/footer.html | HTML | apache-2.0 | 175 |
<!-- HTML header for doxygen 1.8.7-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" conte... | YifuLiu/AliOS-Things | documentation/doxygen/style/header.html | HTML | apache-2.0 | 3,642 |
@echo off
rem win os version, refer to https://en.wikipedia.org/wiki/Ver_(command)
CHCP 65001
for /f "tokens=4,5,6 delims=[]. " %%G in ('ver') do (set _major=%%G& set _minor=%%H& set _build=%%I)
echo System information: [%_major%.%_minor%.%_build%]
if %_major% LSS 6 (
echo Not supported system, minimal Wi... | YifuLiu/AliOS-Things | documentation/quickstart/install_miniconda.bat | Batchfile | apache-2.0 | 1,004 |
#!/usr/bin/env bash
if [ "$(uname)" == "Darwin" ];then
MYOS="Darwin"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ];then
MYOS="Linux"
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ];then
MYOS="Win32"
fi
if [ -z $(which curl) ];then
echo "can not find curl. please install it"
exit ... | YifuLiu/AliOS-Things | documentation/quickstart/install_miniconda.sh | Shell | apache-2.0 | 917 |
import utime
import ustruct
from micropython import const
from driver import UART
# check passwoard: 4 byte 0000
cmdVerifyPasswoard = b'\xEF\x01\xFF\xFF\xFF\xFF\x01\x00\x07\x13\x00\x00\x00\x00\x00\x1B'
# 采集图片
cmdGetImage = b'\xEF\x01\xFF\xFF\xFF\xFF\x01\x00\x03\x01\x00\x05'
# 生成指纹图片对应的特征值
cmdImage2Char = b'\xEF\x01\... | YifuLiu/AliOS-Things | haas_lib_bundles/python/docs/examples/FingerPrintLock/as608.py | Python | apache-2.0 | 14,058 |
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : cloudAI.py
@Description: 云端AI
@Author : jiangyu
@version : 1.0
'''
from aliyunIoT import Device
import utime # 延时函数在utime库中
import ujson as json
class CloudAI :
def __gesture_cb(self, dict) :
'''
Reply lis... | YifuLiu/AliOS-Things | haas_lib_bundles/python/docs/examples/action_recognization/m5stack/code/cloudAI.py | Python | apache-2.0 | 11,672 |
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Description: 人体动作行为识别案例
@Author : jinouxiang
@version : 2.0
'''
import display # 显示库
import uai # AI识别库
import network # 网络库
import ucamera # 摄像头库
import utime # 延时函数在utime库中
import _thread ... | YifuLiu/AliOS-Things | haas_lib_bundles/python/docs/examples/action_recognization/m5stack/code/main.py | Python | apache-2.0 | 4,896 |