Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] Fix syntax error #1515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

vinlim
Copy link
Contributor

@vinlim vinlim commented Jul 28, 2025

try {
    if (data.type != 'audio-scribe' || !data || !isValidUrl(data.objectUrl)) {
      return;
    }
    // Check if it's an audio file
    const audio = await fetch(data.objectUrl);
    content = await audio.blob();
    if (!content.type || !content.type.startsWidth('audio/')) {
      return;
    }
  } catch (e) {
    console.log(e);
  }

Fix startsWidth with startsWith

Copy link

google-cla bot commented Jul 28, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@vinlim vinlim force-pushed the fix/audio-scribe-syntax-error branch from eebbb80 to 0ec1d03 Compare July 28, 2025 08:43
@vinlim vinlim force-pushed the fix/audio-scribe-syntax-error branch from 0ec1d03 to a7a4d78 Compare July 28, 2025 08:49
@oliverdunk oliverdunk requested a review from sebastianbenz July 28, 2025 11:03
Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@sebastianbenz sebastianbenz merged commit 62de17b into GoogleChrome:main Jul 28, 2025
1 of 2 checks passed
@oliverdunk
Copy link
Member

Sorry for missing it, but it looks like there were some formatting issues here: https://github.com/GoogleChrome/chrome-extensions-samples/actions/runs/16564545097/job/46852018501

@vinlim Would you be interested in opening another PR to fix those?

@vinlim
Copy link
Contributor Author

vinlim commented Jul 28, 2025

@oliverdunk oh yes. Sorry about that. There you go #1517 #1518

vinlim added a commit to vinlim/chrome-extensions-samples that referenced this pull request Jul 28, 2025
* Fix syntax error

* Fix prompt format for audio transcription in session.promptStreaming
vinlim added a commit to vinlim/chrome-extensions-samples that referenced this pull request Jul 28, 2025
* Fix syntax error

* Fix prompt format for audio transcription in session.promptStreaming
sebastianbenz added a commit that referenced this pull request Jul 29, 2025
* Fix prompt format for image description in prompt array

* [Bug] Fix syntax error (#1515)

* Fix syntax error

* Fix prompt format for audio transcription in session.promptStreaming

* Fix formatting

---------

Co-authored-by: Sebastian Benz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants