Skip to content

EnableX/enx_voice_iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

EnxRTCiOS

A Swift Package Manager distribution for enx_voice_iOS framework that automatically includes Starscream and SwiftProtobuf for iOS Voice bot.

📋 Requirements

  • iOS 15.0+
  • Xcode 12.0+
  • Device-only builds (no simulator support)

📦 What's Included

When you add this package, you automatically get:

  • enx_voice_iOS - Main iOS SDK framework
  • Starscream - webSocket Freamwork
  • SwiftProtobuf - SwiftProtobuf Freamwork

🚀 Installation

Swift Package Manager

Add this package to your iOS project:

dependencies: [
    .package(url: "https://github.com/EnableX/enx_voice_iOS.git", from: "1.0.0")
]

Or in Xcode:

  1. Go to File → Add Package Dependencies...
  2. Enter the repository URL: https://your-repo-url.git
  3. Select the version and add to your target

💡 Usage

Import the Framework

import enx_voice_iOS
// Starscream and SwiftProtobuf is automatically available through enx_voice_iOS

Basic Usage

// Initialize your Voice Bot  functionality
// (Add your specific usage examples here)

🔧 Technical Details

Package Structure

Build Configuration

  • Platforms: iOS 15.0+
  • Architectures: arm64 (device-only)
  • No Simulator Support: Both frameworks are optimized for device builds only

🛠 Development Notes

  • This package automatically resolves and includes Starscream and SwiftProtobuf when added to projects
  • Users only need to add the enx_voice_iOS package
  • frameworks is pre-compiled XCFrameworks for optimal performance

How to use

Go to your class, where you wanted to implement the Enablex Voice Bot feature, import the libraray

    import enx_voice_iOS

Create the objects for required SDK classes

        var enxVoice : EnxVoiceClient!

This is the object of EnxVoiceClient class, all Enablex Voice Bot based functions/mothods need to call through this object. Once you are connected to the EnableX Voice Bot , you will receive didCallConnected callBack with the reference of EnxVoiceClient to be assign to the enxVoice object.

How to Connect with EnableX Voice Bot
You need to call connect method as code given below -

    enxVoice = EnxVoiceClient(withNumber: "911100123457", forCallBack: self)
    enxVoice.connect(withToken: (responseValue["token"] as! String))
    

Function Parameters

  • token is must be a valid EnableX session token as string.
  • delegate is instance of class where you receive events notifications.
  • withLanguage this is optional to selected prefered loanguage for bot to speak

Callbacks

  • On getting connected with EnableX Voice Bot, following callbacks are received:

      func didStatus(_ status: enx_voice_iOS.EnxVoiceState)
      func didCallConnected()
    
  • On failing to connect with Enablex Voice Bot, following callback are received:

      func didError(_ error: String)
    
  • On being disconnected from EnableX Voice Bot, following callbacks are received:

      func didCallDisconnected()
    
  • On Bot or user speaking notification , following callbacks are received:

      func didUserSpeaking(_ isSpeaking: Bool)
      func didBotSpeaking(_ isSpeaking: Bool)
    
  • On user mute/unmute notification , following callbacks are received:

      func didMuteStateChanged(_ isMuted: Bool)
    

Note: Developers must implement the above mentioned Callbacks as as per their needs.

🆘 Support

For issues or questions:

  1. Check the documentation
  2. Contact support team

About

This is a SPM repository

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages