plamoni / SiriProxy

A (tampering) proxy server for Apple's Siri
GNU General Public License v3.0
2.12k stars 343 forks source link

How do I hijack the speech stream and send it to playback directly? #552

Closed fluentfuture closed 11 years ago

fluentfuture commented 11 years ago

Hi, I'm trying to turn iPhone into a remote microphone and then playback the voice with a raspberry pi downstairs.

The UI of Siri (press the home button and start talking, without need to unlock the phone and look for app) seems more convenient than any other solution I could find (I tried RemoteMic on iPhone, Wo Mic on Android).

I'm thinking to:

So I was looking in the source code hoping to find a place to hajack the whole guzzoni process. But I think I might need some help to find the right code location. There are iPhone.rb and Guzzoni.rb, both extending Connection. But Connection.rb seems to be designed to consume data coming back from Guzzoni, not voice stream coming from iPhone. Yes?

Where is the code that takes stream from iPhone and sends it to Guzzoni?

I guess I'm not even sure if this is possible with how Siri works?

Thank you for the great work and any hint you can give! And apology if this was asked before.

elvisimprsntr commented 11 years ago

Seems like it would be a lot easier to run a speech synthesizer on the RPi and pass the converted text rather than try to process the compressed voice packets directly. Wouldn't be in your own voice but I'm not sure what the quality of the compressed voice packets are.

In either case, this is not really a issue for SiriProxy to track. You will need to modify the source code on your own. I suggest you post your question on a number of forums which specialize in Ruby. Try increasing the SiriProxy log level to help pinpoint where you will need to modify the code.

fluentfuture commented 11 years ago

Thank you for the quick reply!

I didn't realize the issue of sound quality of the compressed voice. So perhaps it's a no-go then, unless I can hack the Siri client on iPhone.

(Yes. Wife said if it's not her voice, she'd not use it)

elvisimprsntr commented 11 years ago

Here is a thread from someone who tried before

https://github.com/plamoni/SiriProxy/issues/209