Speaker Recognition and Diarization open resources

Speaker Recognition



SIDEKIT  – python
MSR Identity Toolbox – matlab
Kaldi – scripting




GMM-UBM i-Vector







Speaker Diarization




kaldi CALLHOME_diarization – scripting



Pyannote – python


aalto speech – python for segment





How to use css class in the innerHtml binding in angular

Credit goes to this link:


“Angular adds all kinds of CSS classes to the HTML it adds to the DOM to emulate shadow DOM CSS encapsulation to prevent styles of bleeding in and out of components. Angular also rewrites the CSS you add to match these added classes. For HTML added using [innerHTML] these classes are not added and the rewritten CSS doesn’t match.”

As a workaround try

  • for CSS added to the component
:host /deep/ mySelector {
  background-color: blue;
  • for CSS added to index.html
body /deep/ mySelector {
  background-color: green;

How to pass data via event from child to parent component in Angular 2

At the child, I have a boolean data want to send to parent if a function method is clicked. What should I do?

Parent code is here. (onChangeDone) to receive an output from the child component and it can trigger a method to receive the event from the child too:


<childcomp (onChangeDone)="onChangeD($event)"> </childcomp>


TS code part:

export class ParentComp {

 onChangeD( result: boolean ) {
        if ( result ) // data changed
          { }
        else { }


At the child component, answer is @Output() and together with the EventEmitter:

export class ChildComp implements OnInit {

    @Output() onChangeDone = new EventEmitter<boolean>();

    clickButton(): void {

How to input a data from parent to child component in Angular 2

At the parent  I have a flag is createOrUpdate want to be sent to child component, parent code is here :


<childcomp [createOrUpdate]="createOrUpdate" > </childcomp >


TS code part:

export class ParentComp {
    createOrUpdate: boolean = true; // true for create, false for update

At the child component, answer is @Input  and same named variable to catch the input:

export class ChildComp implements OnInit {

    @Input() createOrUpdate: boolean;
    buttonText: string = 'Create New Car';
    ngOnInit() {
        if (this.createOrUpdate)
            this.buttonText = 'Create New Car';
        else this.buttonText = 'Update Car';


How to create GUID or UUID in angular 2

There is a tool called angular2-uuid can do this:

npm install angular2-uuid --save

And in your code you can use it.

import { UUID } from 'angular2-uuid';
let uuid = UUID.UUID();

CentOS 7 firewall basic

Wayne Zh

CentOS using firewalld ( not iptables) as firewall. It is a zone based firwall. By default, your network interface’s subnet will be add to trusted zone. You can use these command to check the status and setttings:

sudo systemctl status firewalld

sudo firewall-cmd --list-all-zones

Basic control and start

sudo systemctl disable firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo systemctl stop firewalld

If you want to add a subnet to trusted zone:

sudo firewall-cmd --permanent --zone=trusted --add-source=
sudo firewall-cmd --reload
sudo firewall-cmd --list-all-zones


Angular2 step by step 2 – How to install latest Node.js and NPM

By W.ZH Oct 2016

Install latest Node.js, from Node.js website:

First, make sure you have a C++ compiler. Open the terminal and install the build-essential and libssl-dev packages if needed. By default, Ubuntu does not come with these tools — but they can be installed in the command line.

Use apt-get to install the build-essential package and libssl-dev:

sudo apt-get install build-essential checkinstall

sudo apt-get install libssl-dev

You can install and update Node Version Manager, or nvm, by using cURL:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash

You will be asked to close and reopen the terminal. To verify that nvm has been successfully installed after you reopen the terminal, use:

command -v nvm

That command will output nvm if the installation worked.

To download, compile and install the latest version of Node:


Install latest NPM

There’s a pretty robust install script at https://www.npmjs.org/install.sh. You can download that and run it.

Here’s an example using curl:

curl -L https://npmjs.org/install.sh | sh


Angular2 step by step – 1. Install the Node.js

By W.Zh Oct 2016

Our history and current projects mostly based on the Java/Spring/JSP to do most things. And at the front end side, we use EasyUI, KendoUI, GoJS, Jquery,  and a little bit angular JS 1 to realize the page render, control and data loading. But with the Angular 2 released in last month, I have decided to start using the angular2 in future projects. As we already have the Spring controllers working as the RESTful service in system. so Front end in future will totally be detached from the Java server side easily!!!

Of course we are going to face many challenges  in future about the new tech pick up, old UI migration, interface integrations , but embracing the trend of the detached front end will benefit all teams and it will be fun, especially the Typescript and Angular2 natively have too much common with Java stacks.

I will start to write a series of articles about the angular2 when we adopt it. let us start from installing:

To install Node.js and npm,  in your terminal of Ubuntu:

$ node -v
$ npm -v


Two Contexts in Spring MVC applications – Application Context, WebApplicationContext

By W.ZH Sept 2016

If you directly start learning Spring from the Spring MVC. then you may be ignored a context issue. MVC works in a context called webapplicationcontext  or servlet context. besides this one spring itself already has a root context or application context. So there are some very important points you must be clear on these two:

  • Application Context default use this files as config file – applicationContext.xml . One web application only has one Application Context. Spring loads applicationContext.xml file and creates the ApplicationContext for the whole application. if you have more than one config files for the context, you can config them in the web.xml as the <context-param>:
<web-app ..... >
        <param-value>classpath:applicationContext.xml, classpath:spring-security.xml</param-value>

  • Spring security is in the root context – Application Context, not in the WebApplicationContext
  • Each DispatcherServlet associated with single WebApplicationContext. There can be multiple WebApplicationContext in a single web application.each DispatcherServlet could have one xml config used. in Web.xml it looks like this:
  • WebApplicationContext is a child of “ApplicationContext”, You can access bean in the root context from the WebApplicationContext, but you can not access the bean in the WebApplicationContext from root context.
  • WebApplicationContext contains the  controllers, RestControllers and view resolvers. Root context contains other services, components, DAO access  initialized by the ContextLoaderListener.
  • If you define a property-placeholder in one context, it can not be accessed from another context. This means if you have one properties files need be accessed by @Value in two context, you need to insert this piece config in both context’s xml file”
<context:property-placeholder location="classpath:myConfigProp.properties"
        ignore-resource-not-found="true" />


Refer to: