资源简介
叮当,智能语音控制平台,基于树莓派搭建所有依赖打包下载,
详细介绍:http://blog.csdn.net/kxwinxp/article/details/78853756
代码片段和文件信息
/* ====================================================================
* Copyright (c) 1999-2006 Carnegie Mellon University. All rights
* reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* This work was supported in part by funding from the Defense Advanced
* Research Projects Agency and the National Science Foundation of the
* United States of America and the CMU Sphinx Speech Consortium.
*
* THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ‘‘AS IS‘‘ AND
* ANY EXPRESSED OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
* NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL
* SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
* LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE
* DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ====================================================================
*
*/
#include “evallm.h“
#include “idngram2lm.h“
#include “bo_ng_prob.h“
#include
#include
void arpa_bo_ng_prob(int context_length
id__t *sought_ngram
arpa_lm_t *arpa_ng
int verbosity
double *p_prob
int *bo_case)
{
flag found;
flag found_ngram;
flag found_context;
flag still_found;
int length_exists;
int ng_begin;
int ng_end;
int ng_middle;
int *ng_index;
int temp_case;
double alpha;
double prob;
alpha = 0.0; /* To give no warnings at compilation time */
ng_index = (int *) rr_malloc((context_length+1)*sizeof(int));
if (context_length == 0)
*p_prob = pow(10.0arpa_ng->probs[0][sought_ngram[0]]);
else {
found_ngram = 0;
found_context = 0;
/* Find the appropriate (context-length+1)-gram */
length_exists = 0;
still_found = 1;
while (still_found && (length_exists < (context_length+1))) {
found = 0;
/* Look for (length_exists+1)-gram */
if (length_exists == 0) {
if (get_full_index(arpa_ng->ind[0][sought_ngram[0]]
arpa_ng->ptr_table[0]
arpa_ng->ptr_table_size[0]
sought_ngram[0]) <
get_full_index(arpa_ng->ind[0][sought_ngram[0]+1]
相关资源
- 树莓派3自编手册.pdf
- 树莓派开始,玩转Linux
- 树莓派win10安装资源包10月更新.zip
- 树莓派入门教程.zip
- 树莓派LCD屏幕驱动
- solidworks电路板三维,包含arduino2560、
- 树莓派开发实战 第2版 完整书签板
- 树莓派3b结构图solidworks、CAD模型
- 树莓派开发实战 第2版 PDF
- 树莓派100个精彩案例
- 树莓派sudoers文件
- 树莓派安装ffmpeg及opencv资料
- 树莓派实现无线实时视频传输
- 树莓派用I2C读取mpu9250代码
- 树莓派小车自动驾驶完整源代码
- 在树莓派安装神经计算棒sdk步骤
- 在树莓派上创建无线热点
- 树莓派BCM2836资料
- 树莓派驱动ov7670 带fifo版
- 树莓派 Ubuntu mate16.04 2个usb转串口互相
- 树莓派摄像头资料和例程
- mfrc522 树莓派C代码
- 树莓派根据温度自动控制风扇降温
- kali-linux-2019.3a-rpi3-nexmon-64.img.xz.torre
- 树莓派3B完整原理图
- 树莓派串口通信
- 树莓派语音对话机器人源码
- 树莓派GPU手册 videocore IV
- bcm2835库手册中文版.pdf
- 已安装ROS-Kinectic的树莓派ubuntu16的im
评论
共有 条评论