الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف أعمل شفره برنامج صوت

بدأه النجمه الحره في 11 سبتمبر 2008 · 2 رد · 901 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف أعمل برنامج صوت زي برنامج كلمة السر اللي يعرف أي شي يرد ولكم جزيل الشكر والدعا

#2

اهلاً بالاخت اماني الى منتدانا ... :)

من اجل سؤالك ، تستطيعي البحث حول الـ Speech Recognition in Java

او الـ Voice Recognition in Java ..

هناك العديد من المكتبات APIs التي تقدمها صن لهذا الغرض .. اليك هذا الرابط الذي قد يساعدك :

http://java.sun.com/products/java-media/sp...ecognition.html

لا اله الا الله .. محمد رسول الله

(* ربِ اجعلني مقيم الصلاة و من ذريتي ، ربنا و تقبل دعـاء *)

يا حيّ يا قيـوم ... برحمتك استغيث ... اصلح لي شأني كله و لا تكلني الى نفسي طرفة عين

#3

# //=======================================================================

# //PACKAGE NAME

# //=======================================================================

# package ReconnaissanceVocale;

# //=======================================================================

# //MY IMPORTS

# //=======================================================================

# import drag.CREATEFLAGS;

# //import drag.DgnDictEdit;

# import drag.DgnLanguageConstants;

# import drag.DgnMicBtn;

# import drag.DgnRegisterConstants;

# import drag.DgnMicStateConstants;

# import drag.IDgnDictEditAuto3;

# import drag.DgnVoiceCmd;

# import drag.IVMenuAuto;

# //=======================================================================

# //MY INFOS ABOUT THE VOCAL PART

# //=======================================================================

# //##############################################################################

# //## NAME: ThreadReconnaissanceVocale(.java)

# //##############################################################################

# //## OBJC: This class handle the vocal commands.

# //##############################################################################

# //## CNST: nothing

# //##############################################################################

# //## ATTR: nothing

# //##############################################################################

# //## MTHD: nothing

# //##############################################################################

# //## HIST: de Sany Thibaut - Saint-Luc - 2004-05-19 - ThreadReconnaissanceVocale.

# //##############################################################################

# public class ThreadReconnaissanceVocale extends Thread

# implements ImplMainWindow{

#

# private MainWindow parent = null;

# private DgnVoiceCmd VCmd = null;

# private DgnMicBtn MicBtn = null;

# private ListenerReconnaissanceVocale myListener = null;

# private IVMenuAuto myMenu = null;

#

# /**This constructor build a Thread to handle voice commands

# * @version 1.0

# * @author Thibaut de Sany

# * @since 1.4

# **/

# public ThreadReconnaissanceVocale(MainWindow arg){

# try{

# parent = arg;

# initListener();

# initMenu();

# launchListener();

# }

# catch(Exception e){

# e.getMessage();

# e.printStackTrace();

# }

# }

#

#

#

# /**This method initialise the listener objects

# * @version 1.0

# * @author Thibaut de Sany

# * @since 1.4

# **/

# private void initListener() throws Exception{

# //System.setProperty("JINTEGRA_NATIVE_MODE", " ");

# VCmd = new DgnVoiceCmd();

# // Construct a DgnMicBtn object on this machine.

# MicBtn = new DgnMicBtn();

#

# //dicEdit = new DgnDictEdit();

# //dicEdit.register(0,new Integer(DgnRegisterConstants.dgnregGlobalCM));

# //dicEdit.recognitionModeSet("",0);

#

#

# // Register this application with the Dragon Microphone Button COM object

# // and connect to the Dragon NaturallySpeaking speech engine.

# // This step takes about five seconds on a Pentium III-866.

# MicBtn.register(null);

#

# /////////////////////////////////////////////////

# // A two voice-command menu is set up so that Dragon

# // will generate command recognize events. The design

# // of this voice menu is based on that used in the

# // standard "Simple" example in the Dragon SDK 4.0,

# // that demonstrates interfacing to Dragon via COM.

#

# // Register this application with the Dragon Voice Command COM object.

# VCmd.register("", new Integer(DgnRegisterConstants.dgnregGlobalCM));

# }

#

#

#

# /**This method initialise the listener menu

# * @version 1.0

# * @author Thibaut de Sany

# * @since 1.4

# **/

# private void initMenu() throws Exception{

# // Create a voice menu on the Dragon Voice Command COM object.

# // The new menu is temporary and is discarded when the voice-menu object

# // is released implicitly, upon going out of scope.

# myMenu = VCmd.menuCreate("Simple App", "Simple Menu",

# DgnLanguageConstants.dgnlangFrench/*.dgnlangUSEnglish*/, "",

# CREATEFLAGS.vcmdmc_CREATE_TEMP);

#

# // Add commands, "Fichier" (command Id = 1)

# // "Option" (command Id = 2)

# // and "Aide" to the new voice menu.

# myMenu.add(1, "Fichier", "Simple Navigation Commands",

# "Sets focus to top box", null, null);

# myMenu.add(2, "Option", "Simple Navigation Commands",

# "Sets focus to bottom box", null, null);

# myMenu.add(3, "Aide", "Simple Navigation Commands",

# "Sets focus to bottom box", null, null);

# //////////////////////////////////////////////////

#

# // This line is critical. No command recognize events will be sent by the

# // Dragon Voice Command COM object unless the new voice menu is

# // set active.

# myMenu.setActive(true);

# }

#

#

#

# /**This method launch the vocal Listener

# * @version 1.0

# * @author Thibaut de Sany

# * @since 1.4

# **/

# private void launchListener() throws Exception{

# // Construct a voice command event listener, customised to display

# // details of received command recognize events,

# // and register it with the Dragon Voice Command COM object.

# myListener = new ListenerReconnaissanceVocale(this);

# VCmd.add_DDgnVCmdEventsListener(myListener);

# // Switch on the Dragon microphone.

# MicBtn.setMicState(DgnMicStateConstants.dgnmicOn);

# }

#

#

#

# /**Close the program correctly

# * @version 1.0

# * @author Thibaut de Sany

# * @since 1.4

# **/

# public void niceClose(){

# try{

# // Stop listening to voice command events from the

# // voice command object.

# VCmd.remove_DDgnVCmdEventsListener(myListener);

# // Deactivate voice menu.

# myMenu.setActive(false);

# // Switch off Dragon microphone.

# MicBtn.setMicState(DgnMicStateConstants.dgnmicOff);

# // Unregister this application from the Dragon Microphone Button

# // and Dragon Voice Command COM objects. Disconnects from the

# // Dragon speech engine.

# MicBtn.unRegister();

# VCmd.unRegister();

# // Release any COM objects that have not been garbage collected.

# // Otherwise, the 60MB Dragon process stays loaded in memory for some

# // period of time after this function has ended.

# com.linar.jintegra.Cleaner.releaseAll();

# }catch(Exception e){

# e.getMessage();

# e.printStackTrace();

# }finally{

# VCmd = null;

# MicBtn = null;

# myListener = null;

# myMenu = null;

# }

# }

#

# //=======================================================================

# //LES GETS ET LES SETS

# //=======================================================================

# public MainWindow getMainWindow() { return parent; }

# public DgnVoiceCmd getDgnVoiceCmd() { return VCmd; }

# public DgnMicBtn getDgnMicBtn() { return MicBtn; }

# public ListenerReconnaissanceVocale getListenerReconnaissanceVocale() { return myListener;}

# public IVMenuAuto getIVMenuAuto() { return myMenu; }

#

# }//END OF CLASS

تم تعديل هذه المشاركة بواسطة man4maya في 11 سبتمبر 2008 في 03:09

image-27.gif

concepteur realisateur java j2ee

php5 and asp

مواضيع مشابهة