From Main() to the search routine in Sphinx 3 (s3accurate) Arthur Chan July 8, 2004.

Slides:



Advertisements
Similar presentations
Information Retrieval in Practice
Advertisements

Code Tuning Strategies and Techniques
GCSE Computing Lesson 5.
How Are Algorithms Developed?
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 11 Designing for Usability I.
LINUX-WINDOWS INTERACTION. One software allowing interaction between Linux and Windows is WINE. Wine allows Linux users to load Windows programs while.
Chapter 3: System design. System design Creating system components Three primary components – designing data structure and content – create software –
Linux+ Guide to Linux Certification, Second Edition
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 15 Finalizing.
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
Sphinx 3.4 Development Progress Arthur Chan, Jahanzeb Sherwani Carnegie Mellon University Mar 4, 2004.
CALO Decoder Progress Report for June Arthur (Decoder, Trainer, ICSI Training) Yitao (Live-mode Decoder) Ziad (ICSI Training) Carnegie Mellon University.
Sphinx 3.4 Development Progress Report in February Arthur Chan, Jahanzeb Sherwani Carnegie Mellon University Mar 1, 2004.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
G51FSE Version Control Naisan Benatar. Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
CH07: Writing the Programs Does not teach you how to program, but point out some software engineering practices that you should should keep in mind as.
Bret Juliano. Introduction What Documentation is Required? – To use a program – To believe a program – To modify a program The Flow-Chart Curse Self-Documenting.
Chocolate Bar! luqili. Milestone 3 Speed 11% of final mark 7%: path quality and speed –Some cleverness required for full marks –Implement some A* techniques.
1 Shawlands Academy Higher Computing Software Development Unit.
Temple University Speech Recognition using Sphinx 4 (Ti Digits test) Jaykrishna shukla,Amir Harati,Mubin Amehed,& cara Santin Department of Electrical.
INFO 637Lecture #81 Software Engineering Process II Integration and System Testing INFO 637 Glenn Booker.
Terrier: TERabyte RetRIevER An Introduction By: Kavita Ganesan (Last Updated April 21 st 2009)
Advanced PI Calculation Engine Makes Complex PI Calculations Easy! Use of EDICTvb for Multi-Plant Advanced PI Calculations Dane OverfieldEXELE Information.
1 Lecture 19 Configuration Management Software Engineering.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Web software. Two types of web software Browser software – used to search for and view websites. Web development software – used to create webpages/websites.
The european ITM Task Force data structure F. Imbeaux.
Multimodal User Interface with Natural Language Classification for Clinicians At Point of Care Health Informatics Showcase Peter Budd Sponsors: NCCH -
CE Operating Systems Lecture 3 Overview of OS functions and structure.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
RADE Project Generator. Outline Introduction Project Types Options Generator Files and Layout Source Control (Video 3 Min) Templates and Nifty Tools.
The Software Development Process
1 CS161 Introduction to Computer Science Topic #9.
Database Management Systems (DBMS)
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
Intermediate 2 Computing Unit 2 - Software Development.
The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific.
Polytechnic University of Tirana Faculty of Information Technology Computer Engineering Department A MULTITHREADED SEARCH ENGINE AND TESTING OF MULTITHREADED.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
ALPHABET RECOGNITION USING SPHINX-4 BY TUSHAR PATEL.
WS1-1 ADM , Workshop 1, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 1 INTRODUCTION.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Topic 2: Hardware and Software
Chapter 15 Finalizing Design Specifications
Chapter 15 Finalizing Design Specifications
WORKSHOP 1 introduction
Component 1.6.
System Design.
Web software.
An Introduction to Visual Basic .NET and Program Design
Progress Report of Sphinx in Summer 2004 (July 1st to Aug 31st )
Chapter 15 Finalizing Design Specifications
Navigating huge (UE4 (rendering)) code
Presentation for EEL6586 Automatic Speech Processing
Sphinx 3.X (X=4) Four-Layer Categorization Scheme of Fast GMM Computation Techniques in Large Vocabulary Continuous Speech Recognition Systems
Progress Report of Sphinx in Q (Sep 1st to Dec 30th)
Sphinx Recognizer Progress Q2 2004
Overview Unit testing Building Version control.
BUSINESS COMMUNICATION SKILLS PRESENTATION SKILLS OF THESIS & PROJECT
How Are Algorithms Developed?
Module Recognition Algorithms
Rapid software development
Presentation transcript:

From Main() to the search routine in Sphinx 3 (s3accurate) Arthur Chan July 8, 2004

This presentation…… Design goals of Sphinx 3 (s3accurate) (4 pages) How hard is to trace the Sphinx code? (2 pages) How to trace source code in general? (1 page) A tour from the main function to the search routine. (11 pages) Next time: detail of s3accurate or we could start s3fast.

Design Goals of a Speech Recognizer/Trainer Different goals of building a speech recognition software Software Accuracy Software Speed Software Usability Code Readability – Is it entertaining or easy to read?

If we optimize on only one aspect of Design goal…… Optimizing Accuracy…… Use 1000xRT techniques to optimize recognition rate. Optimizing Speed…… Cryptic coding makes programmer unable to understand what’s going on. Optimizing Usability…… Allow > 1000 options for users in the application But the code become extremely complex.

Conflicts between goals Accuracy vs Speed Usage of approximate search usually give faster decoding time but lower accuracy. Whole sentence decoding make sense for many techniques but cause a lot of delay. Usability vs Readability To make a software to be very usable, the code will be more complicated. Complicated code is generally hard to read.

Design goal of Sphinx 3 (s3accurate) Accuracy > Readability > Usability > Speed Sphinx 3 – the flat lexicon version, was mainly used for research purpose. very modular and easy to be changed by the researchers with experience in C Not many difficult code optimization could be found.

How hard is to trace code of Sphinx? (My view). As many programs Sphinx is just as a set of commands which do additions, subtractions, multiplications and divisions in a specific orders. So…… It is not difficult to understand the code if the underlining algorithm is understood.

Is there a lot of things to read? Number of lines of code of all.c and.h files. = Number of lines in Harry Potter novels Book 1 : ~9000 lines Book 2 : ~9000 lines Book 3 : ~12000 lines Book 4 : ~21000 lines Book 5 : ~27000 lines So…… It is much shorter than the whole series of Harry Potter novels. Actually, it is not much to read.

How to read the source code in general? Several advices Jot notes on the dependency of the code (A file can be found in README.tracing can be found in s3fast and SphinxTrain. ) Jot notes on how certain parts of the code work Something useful but not necessary: An editor with program statistics and hyperlink of function definitions. Such as Microsoft Visual C++ (  ) Or emacs ( ) or vi (  ) Grab a comfortable chair. Be patient.

A tour from the main function to the search routine: Overview Physical layout of the code s3decode-anytopo Brief tour of the programs Initialization Processing Post-processing.

Physical Layout of s3 Getting the code from Sourceforge cvs /cvsroot/cmusphinx/ co archive_s3 archive_s3 S3 : <<= THE ONE S3.0 : <-Why is it there? S3.2 : <- Legacy implementation s3fast wo live- mode decoder S3.3 : <- Legacy implementation s3fast w live- mode decoder

s3 config/ <- for configuration of make doc/ <- documentation include/ <- header files src/ <- all the *.c files. lib/ <- where the library will be bin/ <- where the binary will be.

Inside src/ libio/: file IO functions libutil/: useful data structure libfbs/ : source for all searching code libfeat/ : code for feature extraction

Inside libfbs/ Several files with main() include align-main.c -> the entry point for s3align main.c -> the entry point for s3decode-anytopo allphone-main.c -> the entry point for s3allphone astar-main.c -> the entry point for s3astar nbestrescore-main.c -> the entry point for s3nbestrescore dag.c -> the entry point for s3dag

Logical structure of the code The forward search 1, Do GMM computation for every senones 2, Do search for 1 frames. 3, Iterate until the end of the utterances.

main.c Pseudocode of top level 1, Read command line arguments cmd_ln_define cmdline_parse 2, Initialization Initialize log table lookup, logs3_init Initialize feature feat_init Initialize models models_init 3, Processing of all control files (also do decoding) Process_ctlfiles

process_ctlfiles Pseudocode 1, Read in more parameters 2, For every cepstral file, Run decoding (decode_utt)

decode_utt Run forward search fwdvit Dump hypothesis/lattice/statistics to the output

fwd_vit 1, Initialization of the feature vector 2, For every frame a, Computation of feature b, Computation of Gaussian distribution c, Do forward search for 1 frame

We are almost done ! We went-through the key logic that leads us from the main() function to the GMM computation and search Next time Each component in more details.