AudioKit AKWaveTable initialization error - swift

I am having a weird problem initializing AudioKit AKWaveTable node.
I am trying to change the sample rate of a sound on the fly and I thought AKWaveTable would be the best option to do this.
According to the documentation, this initialization function already sets default parameters for most of the parameters, so I would only need to give it a filename:
self.file=try AKAudioFile(readFileName: fileName)
self.player=AKWaveTable(file: self.file)
I get the following error upon running app:
2018-10-21 17:22:29.276450+0200 AKSoundPool[1479:44079] [default]
Unable to load Info.plist exceptions (eGPUOverrides) 2018-10-21
17:22:29.570701+0200 AKSoundPool[1479:44079] [AudioHAL_Client]
AudioHardware.cpp:666:AudioObjectGetPropertyData:
AudioObjectGetPropertyData: no object with given ID 0
AKWaveTable.swift:init(file:startPoint:endPoint:rate:volume:maximumSamples:completionHandler:loadCompletionHandler:):218:Parameter
Tree Failed 2018-10-21 17:22:29.607702+0200 AKSoundPool[1479:44079]
[avae] AVAEInternal.h:70:_AVAE_Check: required condition is false:
[AVAudioEngine.mm:393:AttachNode: (node != nil)] 2018-10-21
17:22:29.609506+0200 AKSoundPool[1479:44079] required condition is
false: node != nil
I also tried setting all of the other parameters to 0 but I get the same error, parameter tree failed.
Any hints? Am I on the wrong track?
Thank you

Try disabling App Sandbox in your project configuration.
In XCode it's under "capabilities".
I had the same issue and my app was in a sandbox where some key features needed for AudioKit were disabled.

Related

Xcode 14 setAlternateIconName() stopped changing icon?

I'm using the same code in a few projects to change the icon from the app settings, but yesterday it stopped working.
I use
UIApplication.shared.setAlternateIconName("AppIcon-1")
Here's my info.plist
And I have AppIcon, AppIcon-1 and AppIcon-2 in Assets.
When I try to change the icon I get the following in log:
[default] +[LSApplicationProxy applicationProxyFor*] is not a supported method for getting the LSApplicationProxy for the current process, use +[LSBundleProxy bundleProxyForCurrentProcess] instead.
[default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
[default] Attempt to map database failed: permission was denied. This attempt will not be retried.
[db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}````
This is how I implement it.
But for the iPad it has different approach

How to fail a test case in Test if any js error is found by Test Rigor?

I am running a test case in my Test Rigor suite.It is getting passed but I can see some errors in the Test steps that were executed.
Error: JS SEVERE: 52:61 Uncaught TypeError: Cannot read properties of undefined (reading 'toString')
Issue is that Test Rigor is passing all these test cases.I want it to fail the test case in case any such errors are found.Is there any way to do this?
The fail with "error" command will fail a script. To do it within javascript,
try:
testRigor.execute('fail with "error"');
For javascript errors detected on a page, testcases will note those errors by changing the color of the screenshot, however, they will not fail the test as they are exposed as "minor" errors. There is currently no way to detect these errors. You could put in an enhancement request.

Text to speech - not getting audio in the .wav (connection refused)

I run a flask server in which this function is called whenever an specific action occurs on the page :
def generate_audio(text, target):
# create the path
tmp_dir = os.path.join(os.getcwd(), "app/data/audio")
if not os.path.exists(tmp_dir):
os.mkdir(tmp_dir)
path = os.path.join(tmp_dir, f'{target}-{text}.wav')
# query the API
speech_config = SpeechConfig(
subscription=cfg['speech']['key'], region=cfg['speech']['location'])
audio_config = AudioOutputConfig(filename=path)
synthesizer = SpeechSynthesizer(
speech_config=speech_config, audio_config=audio_config)
synthesizer.speak_text("A simple test")
At the end of the execution, the file containing the audio is just an empty 0B file. I literally copy pasted the quick start guide, so I do not know what is wrong.
What I did try is to change the subscription key to something random and no error was raised. In the logs from the azure service webpage nothing comes up either.
Here's the cancellation details
SpeechSynthesisCancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 11. Error details: Code: 0. USP state: 2. Received audio size: 0 bytes.")
Here's the log
https://pastebin.com/aapsMXYc
I was also facing the same issue and found that I was entering incorrect location name. E.g. in resource, you will see a location name like Central India but in SDK it should be entered as centralindia (this name I found under key management). Hope this will help in resolving this issue.
Thanks

Xbox Live User Sign In Failed on Xbox One

I'm testing out the new Creator's Program Unity plugin, and when running the SignInAndProfile example scene on my local machine, it signs me in correctly. However, if I try to deploy it on my Xbox One, the development console gives me the following error:
Warning: unknown type TaskYieldInstruction`1[Microsoft.Xbox.Services.SignInResult] detected. Using reflection to gather its type information. Consider to reference it from your scripts so it can gathered during the build process.
(Filename: C:\buildslave\unity\build\Runtime/Scripting/Backend/DotNet/ScriptingTypeProvider_DotNet.cpp Line: 153)
Exception thrown: 'System.Exception' in Assembly-CSharp.dll
Exception: Sign in Failed. Status: UserInteractionRequired
at XboxLive.<SignInAsync>d__15.MoveNext()
at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)
at UnityEngine.SetupCoroutine.$Invoke1InvokeMoveNext(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: <Unknown> Line: 0)
I can't seem to find anything about what that status message means.
Thanks in advance.
If you're getting an error from RequestTokenSilentAsync, then you should try again with RequestTokenAsync which will bring up any resolution UI.
That said I want to ask first: have you switched your console to the right sandbox? I'm guessing this is likely your issue here.

Failed to load launch URL with error: Error Domain=TVMLKitErrorDomain Code=3 "(null)"

Description:
I created a new TVML project and launched it. The first error was the App Transport Security, which I fixed via Info.plist :
App Transport Security Settings -> Allow Arbitrary Loads -> YES
Then I ran it again and I'm getting this error:
Failed to load launch URL with error: (null)
appController(_:didFailWithError:) invoked with error: Error
Domain=TVMLKitErrorDomain Code=3 "(null)"
The project seems to stop here (application func in AppDelegate.swift):
appControllerContext.launchOptions["BASEURL"] = AppDelegate.tvBaseURL
print(launchOptions) //returns nil
//error on following line
if let launchOptions = launchOptions as? [String: AnyObject] {
//does not enter here
for (kind, value) in launchOptions {
appControllerContext.launchOptions[kind] = value
}
}
What I've tried:
I attempted changing the tvBaseURL from "http://localhost:9001/" to http://MY-IP-ADDRESS-HERE:9001/
but that didn't change anything.
Question:
What is causing this error and how do I solve it?
You should start the server with port number
enter the following command in terminal
ruby -run -ehttpd . -p9001
And finally your tvBaseURL should navigate to the server folder like this
"http://yourLocalhost:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"
I also faced the same problem, I solved it by changing tvBaseURL in AppDelegate
static let tvBaseURL = "http://127.0.0.1:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"
As you see - I have to show exact path to Server folder. That also works if you put it to some web server.
Hope that it can help!
I just ran into this issue. You need to pay close attention to the terminal output.
I got:
[2019-03-15 12:28:43] INFO WEBrick 1.3.1
[2019-03-15 12:28:43] INFO ruby 2.3.7 (2018-03-28) [universal.x86_64-darwin17]
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/socket.rb:205:
in `bind': Address already in use - bind(2) for 0.0.0.0:9001 (Errno::EADDRINUSE)
Address already in use - bind(2) for 0.0.0.0:9001
At this point you either have to choose a different port number (if you decide to do such then make sure your server's port and your Xcode's project port match) or kill the previous server by ctrl + c or just killing that terminal window.
Also note in some of Apple's sample projects the ruby -run -ehttpd . -p9001 command is to be done in a folder named Server and for others it's just suppose to be done in the App's main folder. Just look into the README file to figure this out.