Fran - PowerPoint PPT Presentation

About This Presentation
Title:

Fran

Description:

Delphi Speech Synth se et reconnaisance de la parole avec Delphi Fran ois Gaillard francois point gaillard gmail point com http://fgaillard.com – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 15
Provided by: fg662
Category:
Tags: fran | moteur

less

Transcript and Presenter's Notes

Title: Fran


1
Delphi Speech
Synthèse et reconnaisance de la parole avec Delphi
François Gaillard francois point gaillard à gmail
point com http//fgaillard.com
2
  • Agenda
  • Vue densemble
  • Synthese
  • Dictee
  • Contrôle
  • RichEdit 4.1
  • Delphi Prism

Delphi Speech
3
  • Architecture

Application
Application
Application
Speech API
SAPI runtime
Recognition Engines
TTS Engines
Delphi Speech
4
  • Un peu dhistoire (récente)

SAPI 5.1 Fin 2001. Inclus dans le Speech SDK
v5.1. API Moteurs de synthèse vocale (Mike and
Mary) pour Windows XP. API Moteur de
reconnaissance v6 TRES amélioré pour Office 2003
( LH Michael Michelle) et Windows XP Tablet
PC. SAPI 5.2 2004. Version spéciale de l'API
spécialement pour Microsoft Speech Server.
Support pour Speech Recognition Grammar
Specification (SRGS) and SSML mark-up languages,
fonctionnalités serveurs and performance. Speech
Server inclus la v6 du moteur de reconnaissance
desktop and la v7 du moteur serveur. SAPI 5.3
Refonte majeure API incluse dans Windows Vista
avec de nouveaux moteurs pour la reconnaissance
(Version 8) and la synthèse (Anna).
Reconnaissance vocale complètement intégrée dans
l'OS gt Speech SDK et APIs inclus dans le Windows
SDK général. SAPI 5.4 Mise a jour pour Windows
7.
Delphi Speech
5
  • Synthèse
  • Facile, résultat rapide
  • Bien pour late binding (pas besoin de Type
    Library)
  • Seulement besoin de quelques méthodes ou
    propriétés
  • Très amélioré dans Vista (SAPI 5.3), et Win7
    (SAPI 5.4)
  • Exemple dapplication avec très peu de code
  • Attention au piège Vista ( Win7)
  • Lecture en français avec Speech Server
  • Application de lecture ReadAloud
  • Message derreur sonore
  • Lecteur
  • Jouer avec les paramètres et XML(SSML)

Delphi Speech
6
  • Flags TTS
  • SVSFDefault pour utiliser les valeurs par
    defaut.
  • synthèse synchrone (outrepasser avec
    SVSFlagsAsync),
  • Sans purge des lectures en attente (outrepasser
    avec SVSFPurgeBeforeSpeak),
  • Interpréter le texte comme XML seulement si le
    1er caractère est "lt"   (outrepasser
    avecSVSFIsXML ou SVSFIsNotXML),
  • Changements globaux XML volatiles entre les
    appels (outrepasser avec SVSFPersistXML)
  • Caractères de ponctuation silencieux (outrepasser
    avec SVSFNLPSpeakPunc).
  • SVSFlagsAsync Appels asynchrones. Rend la main
    immédiatement après la mise en file de la
    requête.
  • SVSFPurgeBeforeSpeak Purge toutes les requêtes
    en attente avant cet appel.
  • SVSFIsFilename Le texte passe en paramètre est
    un nom de fichier et non un texte à lire. Cest
    le fichier désigné dont le contenu est lu, pas la
    chaine elle-même.
  • SVSFIsXML Le texte entré est interprété comme
    XML.
  • SVSFIsNotXML Le texte entré nest pas interprété
    comme XML.
  • SVSFPersistXML Les changements globaux passés
    par XML persistent entre les appels.
  • SVSFNLPSpeakPunc Les caractères de ponctuation
    sont prononcés ("Voilà." devient " Voilà point").
  • SVSFParseSapi Force interprétation XML comme MS
    SAPI.
  • SVSFParseSsml Force interprétation XML comme W3C
    SSML.
  • SVSFParseAutoDetect Auto-détection XML. Par
    défaut, si aucun de ces flags nest inclus.
  • SVSFNLPMask Flags utilisés par SAPI (et non pas
    le moteur de synthèse).
  • SVSFParseMask SVSFParseSapiSVSFParseSsml

Delphi Speech
7
  • SAPI XML TTS
  • Balises de contrôle détat de la Voix
  • Volume 0..100 ()
  • ltvolume level"50"gtSpoken at volume level
    fifty.lt/volumegt
  • ltvolume level"80"/gtSpoken at volume level eighty
    from here.
  • Rate -10..10 (0 débit normal, gt0 plus rapide,
    lt0 plus lent)
  • absspeed fixe une valeur absolue
  • speed augmente ou diminue la vitesse
  • Pitch -10..10 (0 hauteur normale, gt0 plus
    aigue, lt0 plus grave)
  • absmiddle
  • middle
  • Emph emphase pour une portion de texte
  • ltemphgt boo lt/emphgt!
  • Spell force la voix a épeler les texte
  • ltspellgtThese words should be spelled out.lt/spellgt
  • Note emph and spell ne peuvent pas etre vides
    (pour la suite du texte)
  • Pour Speech Server compatibilité, voir
  • http//msdn.microsoft.com/en-us/library/dd450827(v
    office.13).aspx

Delphi Speech
8
  • SAPI XML TTS
  • Balise dinsertion directe
  • Silence insert un silence en ms
  • ltsilence msec"500"/gt
  • Bookmark insert un marqueur dans le flux de
    sortie audio.
  • Déclenche un événement dans lapplication lorsque
    le flux latteint.
  • ltbookmark mark"bookmark_one"/gt
  • Pron insert une prononciation explicitée par des
    phonèmes
  • ltpron sym"h eh 1 l ow w er 1 l d "/gt
  • ltpron sym"h eh 1 l ow w er 1 l d"gt hello world
    lt/prongt

SYM Example PhoneID
- syllable boundary (hyphen) 1
! Sentence terminator (exclamation mark) 2
word boundary 3
, Sentence terminator (comma) 4
. Sentence terminator (period) 5
? Sentence terminator (question mark) 6
_ Silence (underscore) 7
1 Primary stress 8
Delphi Speech
9
  • SAPI XML TTS
  • American English Phoneme Table

SYM Example PhoneID
2 Secondary stress 9
aa father 10
ae cat 11
ah cut 12
ao dog 13
aw foul 14
ax ago 15
ay bite 16
b big 17
ch chin 18
d dig 19
dh then 20
eh pet 21
er fur 22
ey ate 23
f fork 24
g gut 25
h help 26
Delphi Speech
10
  • Dictée
  • Importer la Speech Type Library (plus pratique)
  • Activer la reconnaissance vocale sur votre
    ordinateur
  • Et lentrainer Faites le tutorial!
  • Rapide
  • Amusant
  • Vraiment efficace
  • Application Dictée
  • Comment remplir un Memo sans clavier en 10 lignes
    de code

Delphi Speech
11
  • Contrôle
  • Définir une Grammaire
  • Application Dictée (le retour)
  • Comment contrôler votre Memo en moins de 10
    lignes de code

Delphi Speech
12
  • RichEdit 4.1 http//fgaillard.com/2010/09/using-ri
    chedit-4-1-with-d2010/
  • Meilleure compatibilité graphique
  • Capacités vocales améliorées (go to start of
    sentence)
  • unit ComCtrls
  • define richedit41 // FG. try to load enhanced
    RichEdit
  • ifdef richedit41
  • RichEditModuleName 'MSFTEDIT.DLL'
  • OldRichEditModuleName 'RICHED20.DLL'
  • else
  • RichEditModuleName 'RICHED20.DLL'
  • endif
  • ifdef richedit41 IsRichEdit41 Boolean
    endif
  • NewRichEditClassName 'RICHEDIT50W'
  • RichEditClassName 'RICHEDIT20W'
  • ifdef richedit41
  • if IsRichEdit41 then
  • CreateSubClass(Params, NewRichEditClassName)
  • else
  • endif

Delphi Speech
13
  • Delphi Prism
  • Project add reference System.Speech /
    Microsoft.Speech
  • Uses System.Speech.Synthesis /
    Microsoft.Speech.Synthesis
  • Create a new SpeechSynthesizer
  • FVoice new SpeechSynthesizer()
  • Set properties Rate and Volume
  • FVoice.Volume Integer(edtVolume.Value)
  • FVoice.Rate Integer(edtRate.Value)
  • Speak
  • FVoice.SpeakAsync(richTextBox1.Text)

Delphi Speech
14
Delphi Speech
Autres infos Microsoft Speech http//msdn.microso
ft.com/en-us/library/ee721044.aspx Microsoft
Speech API (SAPI) 5.4 http//msdn.microsoft.com/e
n-us/library/ee125663(vVS.85).aspx Mon blog
http//fgaillard.com/tag/speech Difference
System.Speech.Recognition / Microsoft.Speech.Recog
nition http//social.msdn.microsoft.com/Forums/en/
ucmanagedsdk/thread/39ec282d-cc51-49c7-9686-0e4d3f
9b8516
François Gaillard Francois point gaillard à gmail
point com http//fgaillard.com
Write a Comment
User Comments (0)
About PowerShow.com