DeeptoneStream

public class DeeptoneStream

DeeptoneStream

DeeptoneStream predicts audio data every second, the user might provide audio data as AVAudioPCMBuffer to by calling the write method of the instance, every time there’s data available DeeptoneOnData callback will be called providing the user with predictions over time.

When the user is done writing data close method must be called to terminate the stream, this method will trigger DeeptoneOnSuccess callback with all previous predictions.

Since predictions are generated every second DeeptoneStream has a queue mechanism that stores incoming data into memory and when all this data is consumed by DeeptoneStream it automatically calls DeeptoneOnSuccess.

  • write

    Write audio data in AVAudioPCMBuffer format to the stream.

    Declaration

    Swift

    public func write(audioBuffer: AVAudioPCMBuffer)
  • close

    Closes current stream and clear related data

    Declaration

    Swift

    public func close()