Title: Sandboxed (MacOS) Batch transcription fails due to permission error accessing '/private/etc/apache2/mime.types' · Issue #81 · speechmatics/speechmatics-python · GitHub
Open Graph Title: Sandboxed (MacOS) Batch transcription fails due to permission error accessing '/private/etc/apache2/mime.types' · Issue #81 · speechmatics/speechmatics-python
X Title: Sandboxed (MacOS) Batch transcription fails due to permission error accessing '/private/etc/apache2/mime.types' · Issue #81 · speechmatics/speechmatics-python
Description: Batch transcription works using the same code tested in the python console. When sandboxed, the Batch transcription process fails, as some underlying library tries to access "/private/etc/apache2/mime.types". To prevent this permission e...
Open Graph Description: Batch transcription works using the same code tested in the python console. When sandboxed, the Batch transcription process fails, as some underlying library tries to access "/private/etc/apache2/m...
X Description: Batch transcription works using the same code tested in the python console. When sandboxed, the Batch transcription process fails, as some underlying library tries to access "/private/etc/apac...
Opengraph URL: https://github.com/speechmatics/speechmatics-python/issues/81
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sandboxed (MacOS) Batch transcription fails due to permission error accessing '/private/etc/apache2/mime.types'","articleBody":"Batch transcription works using the same code tested in the python console.\r\n\r\nWhen sandboxed, the Batch transcription process fails, as some underlying library tries to access \"/private/etc/apache2/mime.types\". \r\n\r\nTo prevent this permission error, the file needs to be accessed within the app environment (or an alternative option is needed to avoid the file, if possible).\r\n\r\n_Real-time transcription works in the sandboxed context._\r\n\r\nI first thought to store a local copy of the `mime.types` file and track down where Speechmatics is accessing it (to reroute the library to access the local version), but it is elusive and I suspect there is a better solution.\r\n\r\nIf there isn't a straightforward solution using the Speechmatics Python method, I'll plan to test with a lower-abstraction approach in python.\r\n\r\n**Batch transcription test:**\r\n\r\n```\r\nimport speechmatics\r\nfrom speechmatics.batch_client import BatchClient\r\n\r\nssl_context = ssl.create_default_context()\r\nssl_context.load_verify_locations(certifi.where())\r\n\r\nconf = speechmatics.models.BatchTranscriptionConfig(\r\n language=LANGUAGE,\r\n output_local=englishLocale if LANGUAGE == \"en\" else None,\r\n operating_point=operatingPoint,\r\n )\r\n\r\n settings = speechmatics.models.ConnectionSettings(\r\n url=\"https://asr.api.speechmatics.com/v2\",\r\n auth_token=speechmaticsAPIkey,\r\n ssl_context=ssl_context,\r\n )\r\n\r\n try:\r\n with BatchClient(settings) as client:\r\n job_id = client.submit_job(audio=audio_file, transcription_config=conf)\r\n transcript = client.wait_for_completion(job_id, transcription_format='json-v2')\r\n```","author":{"url":"https://github.com/petiatil","@type":"Person","name":"petiatil"},"datePublished":"2023-12-13T01:17:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/81/speechmatics-python/issues/81"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ad1e8ba5-e4d4-db27-607c-b16ecdcbae1a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF74:3CD5B7:59A040:7CFE63:6970ABE3 |
| html-safe-nonce | 2fbdcccefdc7d5306b27136734c833a9a84c5f554f9e4fd2061bf3ec81b6484d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjc0OjNDRDVCNzo1OUEwNDA6N0NGRTYzOjY5NzBBQkUzIiwidmlzaXRvcl9pZCI6IjkwMzkyODQ4MDUzOTk3ODQ0MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ce099fa4d9815760c80a4874b16294f65d733558d5e6a99ea21bc978d3e7663b |
| hovercard-subject-tag | issue:2038780599 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/speechmatics/speechmatics-python/81/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4610c1168f31419a0fdf4f224f7a0292b2a862a4da2741538519f68b0a4bb647/speechmatics/speechmatics-python/issues/81 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4610c1168f31419a0fdf4f224f7a0292b2a862a4da2741538519f68b0a4bb647/speechmatics/speechmatics-python/issues/81 |
| og:image:alt | Batch transcription works using the same code tested in the python console. When sandboxed, the Batch transcription process fails, as some underlying library tries to access "/private/etc/apache2/m... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | petiatil |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5246860f280a060af866c1c633f74a6720ad2dd5d576534e4c5e462496b693ae |
| turbo-cache-control | no-preview |
| go-import | github.com/speechmatics/speechmatics-python git https://github.com/speechmatics/speechmatics-python.git |
| octolytics-dimension-user_id | 15156030 |
| octolytics-dimension-user_login | speechmatics |
| octolytics-dimension-repository_id | 224633111 |
| octolytics-dimension-repository_nwo | speechmatics/speechmatics-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 224633111 |
| octolytics-dimension-repository_network_root_nwo | speechmatics/speechmatics-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d29ab0ba8deb7bbecf06b664759d4e847623783 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width