first commit
This commit is contained in:
commit
5a7e28a00a
|
@ -0,0 +1,19 @@
|
||||||
|
name: resolve
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
tags:
|
||||||
|
- "!*"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
resolve:
|
||||||
|
runs-on: macOS-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Build Package
|
||||||
|
run: swift package resolve
|
|
@ -0,0 +1,52 @@
|
||||||
|
# OS X
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Xcode
|
||||||
|
build/
|
||||||
|
*.pbxuser
|
||||||
|
!default.pbxuser
|
||||||
|
*.mode1v3
|
||||||
|
!default.mode1v3
|
||||||
|
*.mode2v3
|
||||||
|
!default.mode2v3
|
||||||
|
*.perspectivev3
|
||||||
|
!default.perspectivev3
|
||||||
|
xcuserdata/
|
||||||
|
*.xccheckout
|
||||||
|
profile
|
||||||
|
*.moved-aside
|
||||||
|
DerivedData
|
||||||
|
*.hmap
|
||||||
|
*.ipa
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
.bundle
|
||||||
|
|
||||||
|
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||||
|
# Carthage/Checkouts
|
||||||
|
|
||||||
|
Carthage/Build
|
||||||
|
|
||||||
|
# We recommend against adding the Pods directory to your .gitignore. However
|
||||||
|
# you should judge for yourself, the pros and cons are mentioned at:
|
||||||
|
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
|
||||||
|
#
|
||||||
|
# Note: if you ignore the Pods directory, make sure to uncomment
|
||||||
|
# `pod install` in .travis.yml
|
||||||
|
#
|
||||||
|
Pods/
|
||||||
|
Podfile.lock
|
||||||
|
*.xcworkspace
|
||||||
|
|
||||||
|
# Swift Package Manager
|
||||||
|
#
|
||||||
|
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
|
||||||
|
# Packages/
|
||||||
|
# Package.pins
|
||||||
|
.build/
|
||||||
|
xcshareddata/
|
||||||
|
Package.resolved
|
||||||
|
*.xcframework
|
||||||
|
*.xcframework.zip
|
||||||
|
|
||||||
|
docs/
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Synervoz
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,24 @@
|
||||||
|
// swift-tools-version:5.3
|
||||||
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||||
|
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "VoiceFiltersAgoraExtension",
|
||||||
|
defaultLocalization: "en",
|
||||||
|
platforms: [.iOS(.v8)],
|
||||||
|
products: [
|
||||||
|
.library(
|
||||||
|
name: "VoiceFiltersAgoraExtension",
|
||||||
|
targets: ["VoiceFiltersAgoraExtension"]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
dependencies: [],
|
||||||
|
targets: [
|
||||||
|
.binaryTarget(
|
||||||
|
name: "VoiceFiltersAgoraExtension",
|
||||||
|
url: "https://github.com/AgoraIO-Community/Extension-Synervoz-Voice-FX-iOS/releases/download/0.0.1/VoiceFiltersAgoraExtension.xcframework.zip",
|
||||||
|
checksum: "f0044f7cad3efe253811b3c4aa87f223c31027d88a5cc7253ae48c16bbb24e7c"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Synervoz Voice FX
|
||||||
|
|
||||||
|
> An extension for Agora
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://github.com/AgoraIO-Community/Extension-Synervoz-Voice-FX-iOS/actions/workflows/swiftpm-resolve.yml/badge.svg"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://agora-ticket.oss-cn-shanghai.aliyuncs.com/dashboard/marketplace/4a3b16e1.jpg?OSSAccessKeyId=LTAIlIYu0PfwhIZL&Expires=1637699233&Signature=0A96nqBgZajnthUqP1E5G%2FH%2BvtA%3D"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Voice effects can be applied in real time for a variety of purposes. For example, the echo and reverb effects can be used to make it sound like a user is inside a room or hallway; the pitch shifter can be used to mask a user’s voice; and the flanger can be used to add a cool effect (i.e. a slightly delayed duplicate) while singing. Each voice effect (Echo, Reverb, Pitch Shift, Flanger) has parameters that can be modified to create the desired effect. In addition, sliders can be utilized to hear the impact of each parameter in real time. This can be used to fine tune the output for a particular use case or to teach end users about how each of the effects work. More effects and extension features are planned.
|
||||||
|
|
||||||
|
[Click here for full documentation](https://console.agora.io/marketplace/extension/introduce?serviceName=synervoz).
|
||||||
|
|
||||||
|
## Extension Features Overview
|
||||||
|
|
||||||
|
Current effects include echo, reverb, flanger, and pitch shift. Each of these has parameters that can be tweaked in real time.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Add the URL of this repository to your Xcode 11+ Project.
|
||||||
|
|
||||||
|
Go to _File > Swift Packages > Add Package Dependency_, and paste in the link to this repository:
|
||||||
|
|
||||||
|
`https://github.com/AgoraIO-Community/Extension-Synervoz-Voice-FX-iOS.git`
|
|
@ -0,0 +1,70 @@
|
||||||
|
# VoiceFilters SDK
|
||||||
|
|
||||||
|
The Synervoz VoiceFilters SDK allows you to easily add voice filters features to your iOS audio application.
|
||||||
|
|
||||||
|
To get started, check out the [Integration guide](#Integration) or have a look at a few [example integrations](#Example-Integrations).
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
The VoiceFilters iOS SDK supports devices on iOS 11 and above.
|
||||||
|
|
||||||
|
### Sample Rate Support
|
||||||
|
|
||||||
|
There is currently support for the following sample rates: 8000, 16000, 44100, 48000. An API call to `VoiceFiltersSetSampleRate` is needed to set a filters sample rate, and before any audio processing is done.
|
||||||
|
|
||||||
|
## Integration
|
||||||
|
|
||||||
|
The VoiceFilters SDK can be integrated in your C/C++, Objective-C or Swift project with ease.
|
||||||
|
|
||||||
|
First, add the xcframework to your project under Project Settings → General → Frameworks and Libraries. Language specific integration instructions follow.
|
||||||
|
|
||||||
|
### C API
|
||||||
|
|
||||||
|
The native C API is the recommended method of integration with the PinPoint SDK. The steps to get up and running with a basic integration are as follows:
|
||||||
|
|
||||||
|
1. Add the C API header to your code using `#include <voicefilters/VoiceFiltersAPI.h>`
|
||||||
|
2. Create a noise filter object using the `VoiceFilterCreate` function:
|
||||||
|
`VoiceFilter voiceFilter = VoiceFilterCreate();`
|
||||||
|
3. The noise filter operates on audio at 16 KHz and automatically handles sample rate conversion for you. Set your input sample rate using the `VoiceFilterSetSampleRate` function:
|
||||||
|
`VoiceFilterSetSampleRate(voiceFilter, 44100);`
|
||||||
|
4. Call `VoiceFilterProcessVoice` in your audio callback with your input audio buffer. Transformations happens in place and the cleaned up audio is available in the same buffer.
|
||||||
|
`VoiceFilterProcessVoice(voiceFilter, audioBuffer, numberOfSamples);`
|
||||||
|
5. Use the `VoiceFilterGetIsEnabled/VoiceFilterSetIsEnabled` functions to enable/disable the filter as and when its required.
|
||||||
|
`VoiceFilterSetIsEnabled(voiceFilter, true);`
|
||||||
|
6. When you're done with processing audio, call `VoiceFilterDestroy`.
|
||||||
|
`VoiceFilterDestroy(voiceFilter);`
|
||||||
|
|
||||||
|
### Objective-C
|
||||||
|
|
||||||
|
The Objective-C API is also available to use by following the below steps:
|
||||||
|
|
||||||
|
1. The extension of the .cpp file consuming the API must be changed to .mm and adding `#import <voicefilters/PinPoint.h>` to the file.
|
||||||
|
|
||||||
|
2. Create a noise filter object using `PPNoisefilter* noiseFilter = [[PPNoiseFilter alloc] init]`
|
||||||
|
|
||||||
|
3. Setting the noise filter sample rate using the `setSampleRate` function:
|
||||||
|
|
||||||
|
`[noiseFilter setSampleRate:44000]`. This must be done before the filter is ready to process any audio.
|
||||||
|
|
||||||
|
4. The `processAudio` function is called during the audio callback with your input audio buffer, and the number of samples. Transformations happens in place and the cleaned up audio is available in the same buffer. `[noiseFilter processAudio:audioBuffer numberOfSamples:numSamples]`.
|
||||||
|
|
||||||
|
5. The filter can then be enabled, and disabled by using the enabled property on the object `noiseFilter.enabled = false;`
|
||||||
|
|
||||||
|
### Swift
|
||||||
|
|
||||||
|
The PinPoint API is also available to be used with Swift following the below steps:
|
||||||
|
|
||||||
|
1. Import the PinPoint module in the Swift file consuming the API by using `import PinPoint`
|
||||||
|
2. Create a noise filter object using `var noiseFilter = PPNoiseFilter()`
|
||||||
|
3. Setting the noise filter sample rate using `setSampleRate` function: `noiseFilter.setSampleRate(44000)` This must be done before the filter is ready to process any audio.
|
||||||
|
4. The `processAudio` function is called during the audio callback with your input audio buffer, and the number of samples. Transformations happens in place and the cleaned up audio is available in the same buffer. `noiseFilter.processAudio(audioBuffer, numberOfSamples: numSamples)`
|
||||||
|
5. Both the `processAudio` and `setSampleRate` functions return a `NoiseFilterStatus` which may indicate any Internal Errors or signs of No Output if they occur.
|
||||||
|
6. The filter can then be enabled, and disabled by using the enabled property on the object `noiseFilter.enabled = false;`
|
||||||
|
|
||||||
|
### Example Integrations
|
||||||
|
|
||||||
|
- Communication Services - This example demonstrates how you can integrate with communication services like Agora.
|
||||||
|
|
||||||
|
### Logging
|
||||||
|
|
||||||
|
The Logger provided has five levels which can be set with `VoiceFilterSetLogLevel` function with the default being `VoiceFilterLogLevelInfo`. For more detailed messages for the console `VoiceFilterLogLevelTrace`, and `VoiceFilterLogLevelDebug` are also provided. These more detailed messages may impact performance. Finally `VoiceFilterLogLevelWarning` and `VoiceFilterLogLevelError` are provided for warning and error messages.
|
Loading…
Reference in New Issue