Picovoice / picovoice

On-device voice assistant platform powered by deep learning
Apache License 2.0
577 stars 109 forks source link

Picovoice Documentation Issue (/docs/quick-start/picovoice-flutter/) #819

Closed JulianPscheid closed 6 months ago

JulianPscheid commented 6 months ago

Unfortunately these instructions don't work for me. Following them instructions results in these errors:

flutter % dart scripts/prepare_demo.dart en

Error: Couldn't resolve the package 'path' in 'package:path/path.dart'. scripts/prepare_demo.dart:1:8: Error: Not found: 'package:path/path.dart' import "package:path/path.dart"; ^ scripts/prepare_demo.dart:7:10: Error: Method not found: 'dirname'. join(dirname(Platform.script.path), "..", "..", "..", "resources"); ^^^^^^^ scripts/prepare_demo.dart:7:5: Error: Method not found: 'join'. join(dirname(Platform.script.path), "..", "..", "..", "resources"); ^^^^ scripts/prepare_demo.dart:8:27: Error: Method not found: 'join'. final String ppnResPath = join(pvResPath, "porcupine", "resources"); ^^^^ scripts/prepare_demo.dart:9:27: Error: Method not found: 'join'. final String rhnResPath = join(pvResPath, "rhino", "resources"); ^^^^ scripts/prepare_demo.dart:10:27: Error: Method not found: 'join'. final String ppnLibPath = join(pvResPath, "porcupine", "lib"); ^^^^ scripts/prepare_demo.dart:11:27: Error: Method not found: 'join'. final String rhnLibPath = join(pvResPath, "rhino", "lib"); ^^^^ scripts/prepare_demo.dart:12:29: Error: Method not found: 'join'. final String testDataPath = join(pvResPath, ".test", "test_data.json"); ^^^^ scripts/prepare_demo.dart:14:32: Error: Method not found: 'dirname'. final String assetsPath = join(dirname(Platform.script.path), "..", "assets"); ^^^^^^^

flutter % flutter run

Launching lib/main.dart on Pixel 4 in debug mode... You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

Warning: The plugin integration_test requires Android SDK version 34 or higher. For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. One or more plugins require a higher Android SDK version. Fix this issue by adding the following to /Users/julianpscheid/Documents/code-repos/hedy/Picovoice/picovoice/demo/flutter/android/app/build.gradle: android { compileSdkVersion 34 ... }

lib/main.dart:263:9: Error: No named parameter with the name 'primary'. primary: picoBlue, textStyle: TextStyle(color: Colors.white)); ^^^^^^^ ../../../../../SDKs/flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match. static ButtonStyle styleFrom({ ^^^^^^^^^ lib/main.dart:302:9: Error: No named parameter with the name 'primary'. primary: picoBlue, ^^^^^^^ ../../../../../SDKs/flutter/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match. static ButtonStyle styleFrom({ ^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where: Script '/Users/julianpscheid/Documents/code-repos/SDKs/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1419

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command '/Users/julianpscheid/Documents/code-repos/SDKs/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s Running Gradle task 'assembleDebug'... 2,870ms Error: Gradle task assembleDebug failed with exit code 1

laves commented 6 months ago

Duplicate of https://github.com/Picovoice/cheetah/issues/323 so we'll track it there. We'll try to schedule looking at this soon.