Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: ios/chrome/browser/ui/voice/text_to_speech_player.h

Issue 2449593002: [ios] Adds support for parsing Text-to-Speech search results. (Closed)
Patch Set: Disabled Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_VOICE_TEXT_TO_SPEECH_PLAYER_H_
6 #define IOS_CHROME_BROWSER_UI_VOICE_TEXT_TO_SPEECH_PLAYER_H_
7
8 #import <Foundation/Foundation.h>
9
10 // Class responsible for playing TextToSpeech audio data and emitting audio
11 // levels.
12 @interface TextToSpeechPlayer : NSObject
13
14 // Whether there is audio data prepared to be played.
15 @property(nonatomic, readonly, getter=isReadyForPlayback) BOOL readyForPlayback;
16
17 // Whether the TextToSpeechPlayer is currently playing audio.
18 @property(nonatomic, readonly, getter=isPlayingAudio) BOOL playingAudio;
19
20 // Stores a reference to |audioData| and clears up prior TTS state. Calling
21 // this function while |playingAudio| is YES will cancel prior playback. This
22 // function will post a kTTSAudioReadyForPlaybackNotification notification with
23 // the TexToSpeechPlayer used as the sending object.
24 - (void)prepareToPlayAudioData:(NSData*)audioData;
25
26 // Creates an AVAudioPlayer and begins playing audio data passed to
27 // |-prepareToPlayAudioData:|. No-op if called when |readyForPlayback| is NO
28 // or |playingAudio| is YES. This function will post a
29 // kTTSWillStartPlayingNotification with the TextToSpeechPlayer used as the
30 // sending object.
31 - (void)beginPlayback;
32
33 // Stops any active playback and notifies observers that TTS has stopped. This
34 // function will post a kTTSDidStopPlayingNotification notification with the
35 // TextToSpeechPlayer used as the sending object.
36 - (void)cancelPlayback;
37
38 @end
39
40 #endif // IOS_CHROME_BROWSER_UI_VOICE_TEXT_TO_SPEECH_PLAYER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/voice/BUILD.gn ('k') | ios/chrome/browser/ui/voice/text_to_speech_player.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698