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

Unified Diff: content/browser/speech/speech_recognition_request.h

Issue 6615020: Stream speech audio to server as it gets recorded, instead of waiting until end of recording. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/speech/audio_encoder.cc ('k') | content/browser/speech/speech_recognition_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognition_request.h
diff --git a/content/browser/speech/speech_recognition_request.h b/content/browser/speech/speech_recognition_request.h
index 3036d59bb8da5e4b00ab46db33a23caaafcf7b85..3bb629869daf695e5611d5152a136a0c3a7ae31f 100644
--- a/content/browser/speech/speech_recognition_request.h
+++ b/content/browser/speech/speech_recognition_request.h
@@ -46,12 +46,14 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate {
// Sends a new request with the given audio data, returns true if successful.
// The same object can be used to send multiple requests but only after the
// previous request has completed.
- bool Send(const std::string& language,
- const std::string& grammar,
- const std::string& hardware_info,
- const std::string& origin_url,
- const std::string& content_type,
- const std::string& audio_data);
+ void Start(const std::string& language,
+ const std::string& grammar,
+ const std::string& hardware_info,
+ const std::string& origin_url,
+ const std::string& content_type);
+
+ // Send a single chunk of audio immediately to the server.
+ void UploadAudioChunk(const std::string& audio_data, bool is_last_chunk);
bool HasPendingRequest() { return url_fetcher_ != NULL; }
« no previous file with comments | « content/browser/speech/audio_encoder.cc ('k') | content/browser/speech/speech_recognition_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698