speech-synthesis

Creating a UWP DLL using Windows::Media::SpeechSynthesis

天大地大妈咪最大 提交于 2019-12-13 03:33:37
问题 I am currently trying to develop a speech synthesis UWP DLL using the namespace Windows::Media::SpeechSynthesis. I read this documentation and the Microsoft page dedicated to the namespace. I tried to implement the namespace in code. Header file #pragma once #include <stdio.h> #include <string> #include <iostream> #include <ppltasks.h> using namespace Windows::Media::SpeechSynthesis; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Media; using namespace Windows

How to fetch the text spoken to cortana while the SpeechRecognitionResult.Text is returning “…” - Windows UWP

时间秒杀一切 提交于 2019-12-13 00:48:56
问题 While deep linking Windows UWP apps with cortana, I'm unable to fetch the text spoken. In the Voice Command Definition file I'm using a <ListenFor> element with {*} in order to allow user to speak anything, but I'm unable to fetch it. 回答1: If you're trying to set up a VCD to accept freeform dictated text, you'll need to use a PhraseTopic field. See the 1.2 VCD spec for details. For example, if you've got a Command block containing <ListenFor> Take a note to {noteTopic} </ListenFor> You'd want

Start running SpeechSynthesis API on my Android and Safari devices

纵然是瞬间 提交于 2019-12-12 04:15:48
问题 I'm trying to make a web app with the SpeechSynthesis API to run my program after one click on start button and then start listening to the user on my Android and iOS devices. The user could speak anything to run the program. After that, I can play my audio files every three seconds. Below is my code so far. Is my logic wrong? I can't start my program after the click and hear any sound. Another question is this SpeechSynthesis API could support Android and iOS devices, but when I saw some

Synthesizing vowel from existing audio sample jin matlab

老子叫甜甜 提交于 2019-12-11 22:00:32
问题 I'm using matlab and have a recorded sample of a vowel sound. I'm looking to make use of my existing sample to synthesize a vowel sound at a pitch of 150Hz (lasting 5 seconds). I originally thought that I'd just have to take a sample of my existing vowel sound at the given frequency but, obviously, that doesn't actually work. So, now, I'm pretty stumped on how one would actually go about synthesizing the vowel sound? 回答1: A possible approach is: Take a single period of the sample (identified

How to implement a 'wait' state when using multi-threading in C#

给你一囗甜甜゛ 提交于 2019-12-11 19:47:05
问题 I have a class that I am applying multi-threading to. I would like to only allow 1 thread to 'startSpeaking()' at one time. Here is my attempt: class VoiceEffect { SpeechSynthesizer reader = new SpeechSynthesizer(); static readonly object _locker = new object(); public void createVoiceThread(string str) { Thread voicethread = new Thread(() => startSpeaking(str)); // Lambda Process voicethread.IsBackground = true; voicethread.Start(); } public void startSpeaking(string str) { lock (_locker) {

How to set speech callback when using SpeakCFString?

ε祈祈猫儿з 提交于 2019-12-11 07:36:13
问题 I’m trying to use the C CoreFoundation interface to the Speech Synthesis Manager. How do you register a speech callback (such as kSpeechSpeechDoneCallBack or kSpeechTextDoneCallBack )? I know how to use the old deprecated SetSpeechInfo function; how do you do it with the new SetSpeechProperty? When I try to use it, it causes “Segmentation fault: 11” instead of calling the function I registered. According to Speech-Channel Properties, I think you’re supposed to pass in a long CFNumberRef whose

How to properly dispose of SpeechSynthesizer for async text-to-speech?

我只是一个虾纸丫 提交于 2019-12-11 07:31:43
问题 I have a form and I want to allow the user to receive asynchronous text-to-speech output based on the content of a text box whenever a button is pressed. For context, this form is launched as part of an "internal" C# function within VoiceAttack, and this is a continuation of a previous question. This snippet does the job nicely: SpeechSynthesizer synth = new SpeechSynthesizer(); // Create new SpeechSynthesizer instance // Function for asynchronous voicing of text with text-to-speech public

SSML or IPA TTS on Chrome

一世执手 提交于 2019-12-10 17:10:41
问题 o I'm trying to make an app (for myself only) that will pronounce odd (fantasy) names properly. I found chrome's TTS api and W3C's SpeechSynthesis API however it would appear that Chrome strips all SSML tags before speaking the remaining text: <?xml version="1.0"?> <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml

Memory leak in .Net Speech.Synthesizer?

荒凉一梦 提交于 2019-12-10 03:17:16
问题 I found a continuous leakage in my application. After examining using a memory profiler, I found the course is some object from Microsoft Speech.Synthesizer So I build up a toy project to verify the hypothesis: //Toy example to show memory leak in Speech.Synthesizer object static void Main(string[] args) { string text = "hello world. This is a long sentence"; PromptBuilder pb = new PromptBuilder(); pb.StartStyle(new PromptStyle(PromptRate.ExtraFast)); pb.AppendText(text); pb.EndStyle();

Synchronize video subtitle with text-to-speech voice

亡梦爱人 提交于 2019-12-10 02:56:32
问题 I try to create a video of a text in which the text is narrated by text-to-speech. To create the video file, I use the VideoFileWriter of Aforge.Net as the following: VideoWriter = new VideoFileWriter(); VideoWriter.Open(CurVideoFile, (int)(Properties.Settings.Default.VideoWidth), (int)(Properties.Settings.Default.VideoHeight), 25, VideoCodec.MPEG4, 800000); To read aloud the text I use SpeechSynthesizer class and write the output to a wave stream AudioStream = new FileStream(CurAudioFile,