Solution for background sound & speech synth

  • Durum: Closed
  • Ödül: €50
  • Alınan Girdiler: 5
  • Kazanan: bongbong88

Yarışma Özeti

I need an app, which plays an audio file and speak outs a text string with Speech Synthesizer. Piece of cake so far but: This must work when the screen is locked – The playback WILL START when the screen is locked. Also it must support other background music played all the time, and they are faded a bit, when our sound and speech synth is played. This is called ducking. So the workflow would be:

- First open some music app, like spotify, iTunes or whatever which plays music on the background
- Then open this app, lets call it OURAPP. There is only one button in OURAPP. The button calls a function, which waits few seconds (e.g. three seconds) and then plays an audio file (with AV audio player, not sound effect) and after that a speech synthesizer reads some string, eg. "hello world, tomorrow is tomorrow!"
- When the button is tapped and timer is triggered, we lock the screen of the device
- When the timer of three seconds is gonna and the actual function is fired, we hear the audio file and the speech while the background music is ducked (aka volume is lowered). All this when screen is locked.
- After the audio file and speech is spoken, the background music comes back again. The volume ducking can be made for fixed time, for example 4 seconds, no matter how long our speech will take.
- No matter what is the status of the mute switch on the phone, the audio file and speech string can be heard. When adjusted volume with the buttons of the device, they will naturally affect the playback volume of the speech and audio.
- A volume slider for the sound and speech synth in the main menu along our only button is a good bonus
- Support for iOS7 onwards, test with device with iOS 8.3. ObjC preferred. All written programmatically.
- Commented so that the solution can be easily integrated to an existing app.

NOTE: When using normal av audio player and speech syntehsizer methods, the case seems to work out-of-the-box with 8.3 simulator. But on a device it doesn't work! I believe in this case the simulator works wrong, and the device works OK. It makes sense that with normal audio player the app must be active when it is started, and then it can be left playing on the background. But if we want to play sound when the app is already on the background, we must use some other technique. But I presume You know this already! :)

AGAIN: The tricky thing is that playing with audio sessions categories and using normal methods for playing sounds and using speech synthesizer, the app must be ACTIVE when the playback starts. But in our case the screen is LOCKED when the playback starts. Using the "System Sound" for playing the wav does not work here, since it obeys the mute switch. All sounds must be heard even if the phone is muted.

I need a quick solutions, so start coding! :)

Also the app must work as planned, if the app is put on background. As described above, it works when screen is locked AND if home button is pressed and other apps are active or whatever. Think of it as a sport tracker app giving you split times no matter what is the situation with the app's status (foreground/background/locked screen) Also all Apple's guidelines must be met, so playing out silence is not permitted. :)

Tavsiye Edilen Beceriler

Bu yarışmadan başlıca girdiler

Daha Fazla Katılım Görüntüle

Genel Açıklama Panosu

  • bongbong88
    • 3 yıl önce

    How should i do?

    • 3 yıl önce
  • mikkoata
    Yarışma Sahibi
    • 3 yıl önce

    Weird things happening here, now the contest is somehow locked, even if I did nothing. I realized that holding a contest is not perhaps the best way to achieve this, but I want to end this and choose a proper winner, so lets see how we can manage here.

    Naturally I can't choose a winner based on the images posted to the contest. I need a proof of working solution. So I would need a video, where the solution is working. So if You've done the coding already and it works as it should, please record a video and upload it somewhere and send me the link. Please see other post for video requirements.

    I hope we can finish this in terms of contest even if this got a little tricky! :)


    • 3 yıl önce
  • mikkoata
    Yarışma Sahibi
    • 3 yıl önce

    In the video things should work like this:

    - Works on a device (iOS version 7.0 8.3), not simulator.
    - Some other audio source is playing on the background. This can be whatever.
    - You launch your app (OUR APP)
    - You press the button where the audio and speech synth are played after three seconds or so
    - You tap home button and start whatever app and then lock the screen (--> OUR APP goes to background)
    - You hear OUR APP to play the audio and the speech synth and the background music is ducked during this
    - After the audio and speech, the background audio comes back. Immediately or after some delay (if the ducking is set to some fixed time)

    • 3 yıl önce
  • mikkoata
    Yarışma Sahibi
    • 3 yıl önce

    'm pretty new about this, so I don't quite know how to evaluate the solutions. But prepare to shoot a video, where I can see how the end result will work. Never mind the quality of the video or how it looks and are all the titles well animated etc., it is quite easy to determine if the end results work as should. :)

    • 3 yıl önce
  • topstar323
    • 3 yıl önce


    • 3 yıl önce
    1. mikkoata
      Yarışma Sahibi
      • 3 yıl önce

      Hello hello! Interested in participating?

      • 3 yıl önce
    2. bongbong88
      • 3 yıl önce


      • 3 yıl önce

Daha fazla yorum göster

Yarışmalara nasıl başlanır

  • Projenizi ilan edin

    Yarışmanızı İlan Edin Hızlı ve kolay

  • Tonlarca girdi alın

    Tonlarca Girdi Alın Bütün dünyadan

  • En iyi girdiyi seçin

    En iyi girdiyi seçin Dosyaları indirin - Kolay!

Şimdi bir Yarışma İlan Et ya da Bugün Bize Katılın!