alumae/kaldi-gstreamer-server: Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.:
https://www.slideshare.net/xanguera/kaldivoice-your-personal-speech-recognition-server-using-open-source-code
'via Blog this'
Blog Archive
-
▼
2017
(115)
-
▼
December
(22)
- alumae/kaldi-gstreamer-server: Real-time full-dupl...
- How to Auto Execute Commands/Scripts During Reboot...
- 什么是人才
- 工作区和暂存区 - 廖雪峰的官方网站
- 8. Commiting the changes
- [c++][study notes]Polymorphism in C++
- WebRTC中的Opus编码揭秘 - CSDN博客
- Vi Cheat Sheet
- 8. Commiting the changes
- 买人寿保险Life Insurance省钱的小trick,如何拿到commission rebate...
- [Git高级教程(二)] 远程仓库版本回退方法 - CSDN博客
- Kaldi: Kaldi logging and error-reporting
- Java Native Interface (JNI) for calling C-libraries
- java - How to convert jbyteArray to native char* i...
- [c++ note] Differences using char* and std::string...
- C++ md5 function :: zedwood.com
- [studying note] Sample JNI/C++ HelloWorld
- merge - Finding and merging down intervalls in Per...
- SGE: Monitoring and Managing Your Job
- Plotting multiple histograms in one figure - MATLA...
- 为什么你应该关注Amazon SageMaker
- 声纹识别在智能家居领域的应用前景_物联网在线
-
▼
December
(22)
Sunday, December 31, 2017
Saturday, December 30, 2017
How to Auto Execute Commands/Scripts During Reboot or Startup
How to Auto Execute Commands/Scripts During Reboot or Startup:
'via Blog this'
Executing Linux Scripts at Logon and Logout
To execute a script at logon or logout, use
~.bash_profile
and ~.bash_logout
, respectively. Most likely, you will need to create the latter file manually. Just drop a line invoking your script at the bottom of each file in the same fashion as before and you are ready to go.'via Blog this'
Friday, December 29, 2017
什么是人才
6000亿!沉默已久的华为突然抛下重磅炸弹(图) | www.wenxuecity.com: "
'via Blog this'
任正非说了三句关于人才的话,成为了经典。
“一个人不管如何努力,永远也赶不上时代的步伐,更何况在知识爆炸的时代。只有组织起数十人、数百人、数千人一同奋斗,你站在这上面,才摸得到时代的脚。”
“也许是我无能、傻,才如此放权,使各路诸侯的聪明才智大发挥,成就了华为。”
“什么是人才,我看最典型的华为人都不是人才,钱给多了,不是人才也变成了人才。”
'via Blog this'
Thursday, December 28, 2017
Wednesday, December 27, 2017
[c++][study notes]Polymorphism in C++
Polymorphism in C++:
'via Blog this'
Virtual Function
A virtual function is a function in a base class that is declared using the keyword virtual. Defining in a base class a virtual function, with another version in a derived class, signals to the compiler that we don't want static linkage for this function.
What we do want is the selection of the function to be called at any given point in the program to be based on the kind of object for which it is called. This sort of operation is referred to as dynamic linkage, or late binding.
'via Blog this'
WebRTC中的Opus编码揭秘 - CSDN博客
WebRTC中的Opus编码揭秘 - CSDN博客:
"开启DTX
DTX 是
Discontinuous Transmission的简称,这个特性是在用户不说话时不传输语音,这样可以节省点带宽。
默认WebRTC是不开启这个特性的,要开启DTX,只需要在a=ftmp这一行中加入usedtx=1就行"
'via Blog this'
"开启DTX
DTX 是
Discontinuous Transmission的简称,这个特性是在用户不说话时不传输语音,这样可以节省点带宽。
默认WebRTC是不开启这个特性的,要开启DTX,只需要在a=ftmp这一行中加入usedtx=1就行"
'via Blog this'
Tuesday, December 26, 2017
Monday, December 25, 2017
Saturday, December 23, 2017
Friday, December 22, 2017
Thursday, December 21, 2017
Java Native Interface (JNI) for calling C-libraries
Reference:
https://youtu.be/4B-cNXYNRDo
Step 1: prepare files (printmsg.c & main.java)
cat printmsg.c
#include<stdio.h>
void printmsg()
{
printf("hello there world from Gang\n");
}
cat main.java
class MyMain{
public native void printmsg();
static
{
System.loadLibrary("prtmsg");
}
public static void main(String[] args){
MyMain hello = new MyMain();
hello.printmsg();
}
}
Step 2: compileing caller (JAVA)
javac main.java # output MyMain.class
javah MyMain #output MyMain.h
cat MyMain.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class MyMain */
#ifndef _Included_MyMain
#define _Included_MyMain
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: MyMain
* Method: printmsg
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_MyMain_printmsg
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
Step 3: re-editing callee (C)
#edit printmsg.c to include "MyMain.h" & modify function signature
#include<stdio.h>
#include "MyMain.h"
//void printmsg(){
JNIEXPORT void JNICALL Java_MyMain_printmsg
(JNIEnv *env, jobject obj)
{
printf("hello there world from Gang\n");
}
Step 4: compiling callee (C)
gcc -shared -o libprtmsg.so printmessage.c -fPIC -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux
Step 5: preparing environment & testing:
cat build.sh
export LD_LIBRARY_PATH=`pwd`
echo $LD_LIBRARY_PATH
unset LD_LIBRARY_PATH
java MyMain
'via Blog this'
https://youtu.be/4B-cNXYNRDo
Step 1: prepare files (printmsg.c & main.java)
cat printmsg.c
#include<stdio.h>
void printmsg()
{
printf("hello there world from Gang\n");
}
cat main.java
class MyMain{
public native void printmsg();
static
{
System.loadLibrary("prtmsg");
}
public static void main(String[] args){
MyMain hello = new MyMain();
hello.printmsg();
}
}
Step 2: compileing caller (JAVA)
javac main.java # output MyMain.class
javah MyMain #output MyMain.h
cat MyMain.h
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class MyMain */
#ifndef _Included_MyMain
#define _Included_MyMain
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: MyMain
* Method: printmsg
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_MyMain_printmsg
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
Step 3: re-editing callee (C)
#edit printmsg.c to include "MyMain.h" & modify function signature
#include<stdio.h>
#include "MyMain.h"
//void printmsg(){
JNIEXPORT void JNICALL Java_MyMain_printmsg
(JNIEnv *env, jobject obj)
{
printf("hello there world from Gang\n");
}
Step 4: compiling callee (C)
gcc -shared -o libprtmsg.so printmessage.c -fPIC -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux
Step 5: preparing environment & testing:
cat build.sh
export LD_LIBRARY_PATH=`pwd`
echo $LD_LIBRARY_PATH
unset LD_LIBRARY_PATH
java MyMain
'via Blog this'
Tuesday, December 19, 2017
java - How to convert jbyteArray to native char* in jni? - Stack Overflow
java - How to convert jbyteArray to native char* in jni? - Stack Overflow: "How to convert jbyteArray to native char* in jni?
"
'via Blog this'
"
How to convert jbyteArray to native char* in jni?
https://stackoverflow.com/questions/8439233/how-to-convert-jbytearray-to-native-char-in-jni
[c++ note] Differences using char* and std::string - C++ Forum
Differences using char* and std::string - C++ Forum: "Differences using char* and std::string"
Differences using char* and std::string
'via Blog this'C++ md5 function :: zedwood.com
C++ md5 function :: zedwood.com: "g++ main.cpp md5.cpp -o md5_sample && ./md5_sample"
http://www.zedwood.com/article/cpp-md5-function
'via Blog this'
http://www.zedwood.com/article/cpp-md5-function
'via Blog this'
Monday, December 18, 2017
Wednesday, December 13, 2017
merge - Finding and merging down intervalls in Perl - Stack Overflow
merge - Finding and merging down intervalls in Perl - Stack Overflow:
https://stackoverflow.com/questions/42928964/finding-and-merging-down-intervalls-in-perl
'via Blog this'
https://stackoverflow.com/questions/42928964/finding-and-merging-down-intervalls-in-perl
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my %ranges;
#iterate line by line.
while (<>) {
chomp;
#split by line
my ( $name, $start_range, $end_range ) = split;
#set a variable to see if it's within an existing range.
my $in_range = 0;
#iterate all the existing ones.
foreach my $range ( @{ $ranges{$name} } ) {
#merge if start or end is 'within' this range.
if (
( $start_range >= $range->{start} and $start_range <= $range->{end} )
or
( $end_range >= $range->{start} and $end_range <= $range->{end} )
)
{
## then the start or end is within the existing range, so add to it:
if ( $end_range > $range->{end} ) {
$range->{end} = $end_range;
}
if ( $start_range < $range->{start} ) {
$range->{start} = $start_range;
}
$in_range++;
}
}
#didn't find any matches, so create a new range identity.
if ( not $in_range ) {
push @{ $ranges{$name} }, { start => $start_range, end => $end_range };
}
}
print Dumper \%ranges;
#iterate by sample
foreach my $sample ( sort keys %ranges ) {
#iterate by range (sort by lowest start)
foreach
my $range ( sort { $a->{start} <=> $b->{start} } @{ $ranges{$sample} } )
{
print join "\t", $sample, $range->{start}, $range->{end}, "\n";
}
}
Outputs with your data:
SampleA 100 600
SampleA 700 800
SampleA 900 1100
SampleA 1200 1900
SampleB 700 900
SampleB 1000 1800
SampleB 1900 2600
SampleB 3000 3600
This probably isn't the most efficient algorithm though, because it checks all the ranges - but you probably don't need to, because the input data is ordered - you can just check the 'most recent' instead.
'via Blog this'
Subscribe to:
Posts (Atom)