Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #14  
Antiguo 10-06-2011
Ernesto Storch Ernesto Storch is offline
Miembro
 
Registrado: ago 2006
Posts: 33
Poder: 0
Ernesto Storch Va por buen camino
MS agent cambio de idioma

Hola,

Necesito de vuestra ayuda!.

Cómo puedo asignar al MS-AGENT Charlie que habla actualmente en español, la voz de Mary en Inglés?

Alguien tiene algún otro ejemplo de código para poder asignar correctamente el TTS y el idioma?...

Con el MS-Agent Properties viewer 3.1 obtengo las siguientes propiedades:

Character Details
------------------
Name: Charlie.
guid: {20E18DC3-EBE4-11D3-BE2A-C1646EB21146}
TTsModeID: {2CE326E0-A935-11D1-B17B-0020AFED142E}
LanguageID: 3082
Version: 2.00


Voice Detail
--------------
ModeName: Mary
ModeID:= {c77c5170-2867-11d0-847B-444553540000}
Speaker: Product Name: Default female voice
LanguageID: 1033


cuando se ejecuta el siguiente código da una excepción "access violation at ...."


{ set default language in English for listening}
myAgent.LanguageID:=1033; // ********** access violation ******
myAgent.SRModeID:=('{77C5170-2867-11D0-847B-444553540000}'); //se que no es el correcto...pero el error lo da en la asignación del idioma...

UTILIZO EL SIGUIENTE CODIGO extraido de un ejemplo
(DELPHI6, MS AGENT 2.0, SAPI 5.0)

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OleCtrls, AgentObjects_TLB, StdCtrls, ExtCtrls, Buttons;

type
TForm1 = class(TForm)
SpeakEnglish: TSpeedButton;
Agent: TAgent;
procedure FormCreate(Sender: TObject);
procedure SpeakEnglishClick(Sender: TObject);
private
{ Private declarations }
myAgent: IAgentCtlCharacterEx;
myAgentRequests:IAgentCtlRequest;

bAgentListen,bAgentDialoog:Boolean;
sDefaultLanguage,sText:string;

procedure AgentLoad;
procedure AgentShow;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
sDefaultLanguage:='ENGLISH'; // or 'ENGLISH'
{ create agent}
AgentLoad;
AgentShow;

end;

procedure TForm1.AgentLoad;
var
myAgentID:string;
myAgentPath:string;
begin
{ load agent}
myAgentID:='Charlie';
myAgentPath:='c:\localizacion\Agents\'+myAgentID+'.acs';

Agent.Characters.Load(myAgentID,myAgentPath);
myAgent:=Agent.Characters.Item[myAgentID];

{ set default language in English for listening}
myAgent.LanguageID:=1033; //***************access violation***
myAgent.SRModeID:=('{77C5170-2867-11D0-847B-444553540000}'); //mary

{====== init charlie ============}
{ remove any existing commands}
myAgent.Commands.RemoveAll;
{ set menu caption}
myAgent.Commands.Caption:='Listen Charlie';
{ add commands }
myAgent.Commands.Add('charlie','Charlie is listening','Charlie*',True,True);
{ Show captions in pop-up menu }
myAgent.Commands.Visible:=True;
end;

procedure TForm1.AgentShow;
var p1:TPoint;
begin
with myAgent do begin
MoveTo(400,500,0);
show(0);
Speak('HELLO, I AM SPEAKING IN ENGLISH?','');
end;
end;

Gracias!.
Saludos!

Ernesto
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 02:16:21.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi