Advanced configuration
-
You must be an administrator to configure P4 Search.
-
The P4 Search service must be configured to view the Service status page and to configure services using the Configuration page:
-
Windows installer: Basic P4 Search services are configured as part of the installation process.
-
Linux installation: The P4 Search service must be configured manually by editing the etc/config.properties file. See Configure the P4 Search service.
-
This section includes:
Configure the P4 Search service
This section details configuration of the P4 Search service, including connection to external services such as P4 Server and Elasticsearch.
You can either edit the etc/config.properties file or use the web page.
To view and change the configuration of your P4 Search service, navigate to the configuration page (/settings/configure) using the connection details you set for the P4 Search service during the installation. If credentials are requested, provide P4 Server credentials that are administrator level or greater.
For example:
http://myhelixsearch.mydomain.com:1601/p4search/settings/configure
Configure the product and version
P4 Search has a product name and version configuration which is used in the P4 Server log.
Default configuration:
com.perforce.p4search.service.product=p4search Product name visible in the P4 Server log
com.perforce.p4search.service.version=0.1 Product version visible in the P4 Server log
If you have multiple instances of P4 Search, we recommend that you append the product name to help distinguish between the log entries.
For example:
com.perforce.p4search.service.product=p4search-1
com.perforce.p4search.service.product=p4search-2
Configure the web service
By default, the P4 Search web service is public to machines on the same network.
Default configuration:
com.perforce.p4search.service.protocol=http
com.perforce.p4search.service.host=0.0.0.0
com.perforce.p4search.service.port=1601
com.perforce.p4search.service.keystore= (see Optional HTTPS security settings)
com.perforce.p4search.service.keypass= (see Optional HTTPS security settings)
Configure the location and password of the local trust store
The location of P4 Search's local trust store defaults to ./etc/truststore.jks and the password is randomly generated.
Default configuration:
com.perforce.p4search.service.truststore=./etc/truststore.jks
com.perforce.p4search.service.trustpass=<PASSWORD>
Configure the external URL
The URL of your P4 Search instance, as seen by other applications, defaults to http://localhost:1601. For example, this external URL can be used by P4 Server or P4 DAM to connect to a specific instance of P4 Search.
Default configuration:
com.perforce.p4search.service.external-url=http://localhost:1601
Specify CORS
Specify an origin for the browser to allow resource access. This type of permission is also known as Cross-Origin Resource Sharing (CORS). If the CORS value is left blank, the external URL value is used as an allowed origin along with the protocol and port number. To secure your site, https protocol must be used. The default value is empty.
Default configuration:
com.perforce.p4search.service.access-control-allow-origin=
Configure the live logs limit
The live logging data displayed in the logging window of the P4 Search web UI defaults to 300 lines.
Default configuration:
com.perforce.p4search.service.live-log-limit=300
Configure the global rate limit
The number of requests per minute for all API endpoints defaults to 600.
Default configuration:
com.perforce.p4search.service.global-rate-limit=600
Configure the login rate limit
The number of login requests per minute for all API endpoints defaults to 5.
Default configuration:
com.perforce.p4search.service.login-rate-limit=5
Configure the JWT Access token
The duration after which the JWT Access token expires defaults to 600 seconds.
com.perforce.p4search.service.access-token-ttl=600
Configure the JWT Refresh token
The duration after which the JWT Refresh token expires defaults to 900 seconds.
com.perforce.p4search.service.refresh-token-ttl=900
Configure the Nonce token
A nonce token is a unique, random number or string that is used only once and then discarded. It acts as a security measure to prevent replay attacks in communication protocols, particularly in API requests.
The nonce token is included in the request header along with the authentication token, and it must be present in all API requests for security purposes. This practice ensures that each request is unique, even when the same authentication details are used.
Defaults to false. To enable a nonce token, which is a unique string, set com.perforce.p4search.service.nonce to true.
Default configuration:
com.perforce.p4search.service.nonce=false
Configure P4 Server
The P4 Server connection requires a P4Port, a Perforce Standard user and a ticket.
Default configuration:
com.perforce.p4search.service.startup-retry=30000
com.perforce.p4search.core.p4port=localhost:1666
com.perforce.p4search.core.p4trust=
com.perforce.p4search.core.service.p4user=p4search
com.perforce.p4search.core.service.p4ticket=AEEB1208CB06479B022D97C2784EEFDA
com.perforce.p4search.core.index.p4user=p4index
com.perforce.p4search.core.index.p4ticket=AEEB1208CB06479B022D97C2784EEFDA
com.perforce.p4search.core.p4ignore=
com.perforce.p4search.core.extension.auto-update=true
com.perforce.p4search.core.maxfilesize=1073741824
Specify the P4Port setting and the Perforce Service user
The Perforce Service user is a Standard or Service user with a minimum of admin access. Used to authorize the proxy connection at Security level 5 and above. For instructions on creating the Perforce Service user and printing out the ticket, see Create the Perforce Service user .
-
The long-lived ticket must be a local ticket and not an all-hosts ticket.
-
The P4 Server must have a valid server spec with the AllowedAddresses field set. For information about Security level 6, see Server security levels in the P4 Server Administration Documentation.
For example:
com.perforce.p4search.core.p4port=perforce.com:1666
com.perforce.p4search.core.service.p4user=service
com.perforce.p4search.core.service.p4ticket=FFEEDDCCBBAA99887766554433221100
For an SSL-enabled P4 Server
If your P4 Server is SSL enabled, add the ssl protocol to the p4port field and provide the trusted fingerprint in the p4trust field:
com.perforce.p4search.core.p4port=ssl:perforce.com:1666
com.perforce.p4search.core.p4trust=59:75:62:6C:4F:C9:53:F5:4A:30:90:FF:C9:60:01:10:C7:D0:ED:1F
Specify the Perforce Index user (optional)
The Perforce Index user is a Standard user with super access. Used to read content from the P4 Server, to set file attributes, and to install extensions. For instructions on creating the Perforce Index user and printing out the ticket, see Create the Index user . If the Index user is not defined, the Perforce Service user is used.
For example:
com.perforce.p4search.core.index.p4user=index
com.perforce.p4search.core.index.p4ticket=AEEB1208CB06479B022D97C2784EEFDA
Specify allowed services
If you are using P4 Search with another service, such as P4 Code Review, and are using P4 Server Security level 5 and above, provide a list of trusted IP addresses for the services.
For example:
com.perforce.p4search.core.allowed=swarm.perforce.com,proxy.perforce.com
Set the retry interval
The retry interval when locating Elasticsearch and Perforce services defaults to 30000 milliseconds.
com.perforce.p4search.service.startup-retry=30000
Set the flag to automatically update extensions
The flag to automatically update extensions if they are out of date during start up defaults to true.
com.perforce.p4search.core.extension.auto-update=true
Set the maximum file size
The maximum file size defaults to 1GB.
com.perforce.p4search.core.maxfilesize=1073741824
Configure the index
P4 Search indexes P4 Server data when called with the REST API. See the index endpoints in the Swagger P4 Search REST API.
The following configuration options determine the behavior of the indexer.
Set the index token
The index token defaults to 00000000-0000-0000-0000-000000000000.
com.perforce.p4search.index.token=00000000-0000-0000-0000-000000000000
Set the maximum threads used for indexing
The number of threads P4 Search uses when indexing P4 Server changelists defaults to 8 threads.
com.perforce.p4search.index.threads=8
Set the maximum size of files that are indexed
The max file size (in bytes) at which P4 Search will try to index the file's content defaults to 10MB.
com.perforce.p4search.tika.maxfilesize=10485760
Set the P4 Search timeout
The timeout used by P4 Search defaults to 20000 milliseconds.
com.perforce.p4search.tika.timeout=20000
Set the maximum number of changes per single bulk request
The number of changes in a single bulk request to Elasticsearch defaults to 100 changes.
com.perforce.p4search.index.bulksize=100
Set the trusted IP addresses for P4 Search
Provide a comma-separated list of IP addresses that are trusted by P4 Search.
com.perforce.p4search.core.allowed=
Set thumbnail/preview generation
Set to true (the default) to generate the blur and thumbnail/preview images when indexing is run.
-
Blur images are stored on the P4 Server as an attribute of the original image file and indexed in Elasticsearch. They consist of a 4-pixel image stored as a Hash String that loads extremely quickly. P4 DAM displays the blur images for search queries while the thumbnail/preview images are loaded.
-
Thumbnails/previews are stored on the P4 Server as an attribute of the original image files. They are up to 240 x 240 pixels depending on the original image's aspect ratio. P4V and P4 DAM use the thumbnails for image preview.
com.perforce.p4search.index.thumbnail=true
Set thumbnail/preview image size
The image thumbnail/preview size (in pixels) defaults to 1440 pixels.
com.perforce.p4search.index.preview-size
Set thumbnail/preview image type
The image thumbnail/preview type, defaults to jpg file type.
com.perforce.p4search.index.preview-ext
Set Tesseract OCR
Tesseract Optical Character Recognition (OCR) is disabled by default.
com.perforce.p4search.index.tesseract
Set journal path
The location where the live index journals are stored is relative to the P4 Search install location.
com.perforce.p4search.index.journal-path=./jnl
Set journal rebuild threshold
The journal is rebuilt when the completed tasks exceed the threshold, which defaults to 1000 tasks.
com.perforce.p4search.index.journal-threshold=1000
Configure filters for search results
User query results can be filtered by P4 Search. The following configuration options determine the behavior of the P4 Search filtering.
Filter search results for restricted changelists
To filter restricted changelists, set the restricted field to true (this is the default and is recommended).
com.perforce.p4search.index.restricted=true
Filter search results by P4 Server user permissions
To filter user search results based on their P4 Server permissions (the output of the p4 protect command), set the permission.required field to true (the default). This requires the installation of the P4 Server p4search-filter plugin for Elasticsearch. See the Elasticsearch configuration plugin documentation.
com.perforce.p4search.elastic.filter=true
Use of the P4 Server p4search-filter plugin will introduce a small overhead in the query time. This is mainly determined by the number of protection entries that are applied to the user running the query. In some situations, you might want to disable the filter if P4 Search only contains indexed data that is visible to all users.
Configure Elasticsearch
Default configuration:
com.perforce.p4search.elastic.hosts=http://localhost:9200
com.perforce.p4search.index.name=perforce1
com.perforce.p4search.elastic.user=
com.perforce.p4search.elastic.pass=
com.perforce.p4search.elastic.tracktotalhits=10000
com.perforce.p4search.elastic.insecure=
com.perforce.p4search.index.tags=
com.perforce.p4search.index.bulksize=100
Configure Elasticsearch hosts
- Provide the configuration with a comma-separated list of Elasticsearch hosts, for example:
- P4 Search needs access to Elasticsearch to create and update the alias index for the P4 Server data. P4 Search now creates partitioned index.
com.perforce.p4search.elastic.hosts=http://localhost:9200,http://localhost:9201
The name of the index is configured using:
com.perforce.p4search.index.name=perforce1
Configure Elasticsearch authentication
If your Elasticsearch instance requires authentication, add to the following empty fields (the default) to the configuration.
com.perforce.p4search.elastic.user=
com.perforce.p4search.elastic.pass=
Tune Performance
To tune performance:
-
Set a limit to the number of results processed by a single query. The default is 10000.
-
Set the maximum Elasticsearch batch size used when indexing data. The default is 100.
com.perforce.p4search.elastic.tracktotalhits=10000
com.perforce.p4search.index.bulksize=100
Set the index tags
For use with P4 DAM only: Set the index tags as a comma separated list. By default, there are no tags. Any tag that begins with an index tag value in the list is indexed. The index tags are not case sensitive.
com.perforce.p4search.index.tags=
For example:
com.perforce.p4search.index.tags=dam_tag, dam_autotag, dam_custom
If dam_tag, dam_autotag, and dam_custom are index tags, P4 Search will index any tag that begins with dam_tag, dam_autotag, or dam_custom. In this example, tags called dam_tag_A, dam_autotag_B, and dam_custom_C would all be indexed but a tag called D_dam_tag would not.
Configure self-signed certificate
Set to true (the default) to allow P4 Search to work with a self-signed Elasticsearch certificate.
com.perforce.p4search.elastic.insecure=true
If you wish to trust a different certificate, set com.perforce.p4search.elastic.insecure=false and use the following command:
/opt/perforce/helix-p4search/jre/bin/keytool -importcert -alias elasticCA -keystore /opt/perforce/helix-p4search/jre/lib/security/cacerts -storepass changeit -file <location of your Elasticsearch certificate> -noprompt
where
file <location of your Elasticsearch certificate> is located on the Elasticsearch host: /etc/elasticsearch/certs/http_ca.crt
Configure auto-tagging of images
P4 Search can be configured to auto-detect tags for your image files.
Azure Tags
AWS Rekognition
GoogleLabel
DeepDetect
For information about installing your auto-tagging service, see your auto-tagging service provider.
Default configuration:
The com.perforce.p4search.auto-detect.service configurable is only used for DeepDetect.
By default, auto-tagging of images is disabled.
com.perforce.p4search.auto-detect.model=
com.perforce.p4search.auto-detect.host=
com.perforce.p4search.auto-detect.lang=
com.perforce.p4search.auto-detect.key=
com.perforce.p4search.auto-detect.threshold=
com.perforce.p4search.auto-detect.best=
com.perforce.p4search.auto-detect.service=
Configure the auto-tagging service for Azure tags
-
Set the auto-tagging model to AzureTagsModel, for example:
-
Specify the auto-tagging service hostname. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. For example:
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.model=AzureTagsModel
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Example auto-tagging configuration for Azure tags:
com.perforce.p4search.auto-detect.model=AzureTagsModel
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Configure the auto-tagging service for AWS Rekognition
-
Set the auto-tagging model to RekognitionLabelsModel, for example:
-
Specify the auto-tagging service region as host. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. The API key for the AWS Rekognition is a combination of <aws_access_key_id> and <aws_secret_access_key>. For example:
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.model=RekognitionLabelsModel
com.perforce.p4search.auto-detect.host=us-east-2
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=<aws_access_key_id>:<aws_secret_access_key>
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
where
ws_access_key_id
=ABCDEFGHIJKL12345678
ws_secret_access_key=ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Example auto-tagging configuration for AWS Rekognition:
com.perforce.p4search.auto-detect.model=RekognitionLabelsModel
com.perforce.p4search.auto-detect.host=us-east-2
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Configure the auto-tagging service for GoogleLabel
-
Set the auto-tagging model to GoogleLabelModel, for example:
-
Specify the auto-tagging service hostname. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. For example:
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
-
Specify the automatic best image detection results limit. Defaults to 10 results:
com.perforce.p4search.auto-detect.model=GoogleLabelModel
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Example auto-tagging configuration for GoogleLabel:
com.perforce.p4search.auto-detect.model=GoogleLabelModel
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
Configure the auto-tagging service for DeepDetect
-
Set the auto-tagging model to DeepDetectModel:
-
Specify the auto-tagging service hostname. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages.
DeepDetect does not support multiple languages. Leave empty for DeepDetect:
-
Enter the API key for your auto-tagging service.
DeepDetect does not support an API key. Default is empty:
-
Specify the automatic image detection threshold for your auto-tagging service as a floating point percentage. For example, 0.1=10%:
-
Specify the automatic best image detection results limit. Defaults to 10 results:
- Specify the classification service you want to use for image tags. For example,
classification_21k
if you are using the DeepDetect 21k pre-trained model:
com.perforce.p4search.auto-detect.model=DeepDetectModel
com.perforce.p4search.auto-detect.host=https://localhost:8888
com.perforce.p4search.auto-detect.lang=
com.perforce.p4search.auto-detect.key=
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.service=classification_21k
Example auto-tagging configuration for DeepDetect:
com.perforce.p4search.auto-detect.model=DeepDetectModel
com.perforce.p4search.auto-detect.host=http://localhost:8888
com.perforce.p4search.auto-detect.lang=
com.perforce.p4search.auto-detect.key=
com.perforce.p4search.auto-detect.threshold=0.1
com.perforce.p4search.auto-detect.best=10
com.perforce.p4search.auto-detect.service=classification_21k
For more information about using a pre-trained model, see DeepDetect's Setup of an image classifier.
Example curl request to load the DeepDetect 21k pre-trained model:
curl -H "Content-Type: application/x-www-form-urlencoded" -X PUT -d '{ "description": "generic image classification service", "model": { "repository": "/opt/models/classification_21k", "init":"https://deepdetect.com/models/init/desktop/images/classification/classification_21k.tar.gz", "create_repository": true }, "mllib": "caffe", "type": "supervised", "parameters": { "input": { "connector": "image" } } }' http://localhost:8888/services/classification_21k
Configure image OCR
AzureOcrModel
RekognitionOcrModel
GoogleOcrModel
P4 Search can be configured to enable image Optical Character Recognition (OCR) by specifying the OCR model for your image files.
Default configuration:
By default, image OCR is disabled.
com.perforce.p4search.auto-ocr.model=
com.perforce.p4search.auto-detect.host=
com.perforce.p4search.auto-detect.lang=
com.perforce.p4search.auto-detect.key=
The auto-ocr model uses the auto-tagging host, language, and key to configure the auto-ocr service.
Configure the auto-ocr service for AzureOcrModel
-
Set the auto-ocr model to AzureOcrModel, for example:
-
Specify the auto-tagging service hostname. For example:
-
Specify the language you want the image tags to be generated in, see your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. For example:
com.perforce.p4search.auto-ocr.model=AzureOcrModel
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
Example auto-ocr configuration for AzureOcrModel:
com.perforce.p4search.auto-ocr.model=AzureOcrModel
com.perforce.p4search.auto-detect.host=https://my.cognitiveservices.azure.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=0123456789ABCDEF0123456789ABCDEF
Configure the auto-ocr service for RekognitionOcrModel
-
Set the auto-ocr model to RekognitionOcrModel, for example:
-
Specify the auto-tagging service region as host. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. The API key for the RekognitionOcrModel is a combination of <aws_access_key_id> and <aws_secret_access_key>. For example:
com.perforce.p4search.auto-ocr.model=RekognitionOcrModel
com.perforce.p4search.auto-detect.host=us-east-2
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=<aws_access_key_id>:<aws_secret_access_key>
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
where
ws_access_key_id
=ABCDEFGHIJKL12345678
ws_secret_access_key=ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
Example auto-ocr configuration for RekognitionOcrModel:
com.perforce.p4search.auto-ocr.model=RekognitionOcrModel
com.perforce.p4search.auto-detect.host=us-east-2
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
Configure the auto-ocr service for GoogleOcrModel
-
Set the auto-ocr model to GoogleOcrModel, for example:
-
Specify the auto-tagging service hostname. For example:
-
Specify the language you want the image tags to be generated in. See your auto-tagging service documentation for supported languages. For example:
-
Enter the API key for your auto-tagging service. For example:
com.perforce.p4search.auto-ocr.model=GoogleOcrModel
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
Example auto-ocr configuration for GoogleOcrModel:
com.perforce.p4search.auto-ocr.model=GoogleOcrModel
com.perforce.p4search.auto-detect.host=https://vision.googleapis.com
com.perforce.p4search.auto-detect.lang=en
com.perforce.p4search.auto-detect.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
Configure speech-to-text recognition
-
Speech-to-text recognition can be used for audio and video files.
-
All audio and video files up to 60 seconds are referred to as short audios.
-
Audio or video files longer than 60 seconds are only supported for the AmazonTranscribeModel.
-
For all audio and video files up to 60 seconds, the audio is transcribed synchronously. Files longer than 60 seconds are skipped unless you are using the AmazonTranscribeModel.
AzureSpeechModel
AmazonTranscribeModel
GoogleSpeechModel
WhisperSpeechModel
P4 Search can be configured to enable speech-to-text transcription by specifying the automatic speech recognition model.
Default configuration:
By default, speech-to-text is disabled.
com.perforce.p4search.auto-speech.model=
com.perforce.p4search.auto-speech.host=
com.perforce.p4search.auto-speech.lang=
com.perforce.p4search.auto-speech.key=
com.perforce.p4search.auto-speech.threshold=
com.perforce.p4search.auto-speech.short-audio=
com.perforce.p4search.auto-speech.bucket= (only available for AmazonTranscribeModel)
com.perforce.p4search.auto-speech.timeout=
Limitations
The speech-to-text recognition has the following limitations:
-
AmazonTranscribeModel
does not transcribe an mp4 file of 48000 sample rate. -
AzureSpeechModel and GoogleSpeechModel can transcribe only up to 60 seconds of audio and video files.
Configure the auto-speech recognition service for AzureSpeechModel
-
Set the auto-speech model to AzureSpeechModel:
-
Specify the auto-speech recognition service hostname. For example:
-
Specify the language of the audio you want to be transcribed. For example:
-
Enter the API key for your auto-speech recognition service. For example:
- Set the automatic speech recognition threshold for your auto-speech service as a floating point percentage. This threshold is the accuracy returned by your auto-speech service. For example, 0.6=60%.
-
Set the short audio transcribe limit (in seconds). For example:
-
Specify the name of the cloud storage bucket or container where the large speech files will be stored. For example:
-
Specify the timeout limit for short audio transcription processing from the cloud services (in seconds. For example:
com.perforce.p4search.auto-speech.model=AzureSpeechModel
com.perforce.p4search.auto-speech.host=https://eastus.stt.speech.microsoft.com
com.perforce.p4search.auto-speech.lang=en-US
com.perforce.p4search.auto-speech.key=0123456789ABCDEF0123456789ABCDEF
In this example, when the auto-speech threshold is set to 0.6, any transcription with 60% accuracy is accepted by the auto-speech service and anything below that is discarded.
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.bucket=cloud_storage_bucket_name
com.perforce.p4search.auto-speech.timeout=1200
Example auto-speech recognition configuration for AzureSpeechModel:
com.perforce.p4search.auto-speech.model=AzureSpeechModel
com.perforce.p4search.auto-speech.host=https://eastus.stt.speech.microsoft.com
com.perforce.p4search.auto-speech.lang=en-US
com.perforce.p4search.auto-speech.key=0123456789ABCDEF0123456789ABCDEF
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.bucket=cloud_storage_bucket_name
com.perforce.p4search.auto-speech.timeout=1200
Configure the auto-speech recognition service for AmazonTranscribeModel
-
Set the auto-speech model to AmazonTranscribeModel:
-
Specify the auto-speech recognition service hostname. For example:
-
Specify the language of the audio you want to be transcribed. For example:
-
Enter the API key for your auto-speech recognition service. The API key for the AmazonTranscribeModel is a combination of <aws_access_key_id> and <aws_secret_access_key>. For example:
-
Set the automatic speech recognition threshold for your auto-speech service as a floating point percentage. This threshold is the accuracy returned by your auto-speech service. For example, 0.6=60%.
In this example, when the auto-speech threshold is set to 0.6, any transcription with 60% accuracy is accepted by the auto-speech service and anything below that is discarded.
-
Set the short audio transcribe limit (in seconds). For example:
-
Specify the name of the cloud storage bucket or container where the large speech files are stored. For example:
-
Specify the timeout limit for short audio transcription processing from the cloud services (in seconds). For example:
com.perforce.p4search.auto-speech.model=AmazonTranscribeModel
com.perforce.p4search.auto-speech.host=us-east-2
com.perforce.p4search.auto-speech.lang=en-US
com.perforce.p4search.auto-speech.key=<aws_access_key_id>:<aws_secret_access_key>
com.perforce.p4search.auto-speech.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
where
ws_access_key_id
=ABCDEFGHIJKL12345678
ws_secret_access_key=ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.bucket=cloud_storage_bucket_name
com.perforce.p4search.auto-speech.timeout=1200
Example auto-speech recognition configuration for AmazonTranscribeModel:
com.perforce.p4search.auto-speech.model=AmazonTranscribeModel
com.perforce.p4search.auto-speech.host=us-east-2
com.perforce.p4search.auto-speech.lang=en-US
com.perforce.p4search.auto-speech.key=ABCDEFGHIJKL12345678:ab0cd1ef2gh3IJ4aaaBBBcccWWW111rfc1234YERTpp
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.bucket=cloud_storage_bucket_name
com.perforce.p4search.auto-speech.timeout=1200
Configure the auto-speech recognition service for GoogleSpeechModel
-
Set the auto-speech model to GoogleSpeechModel:
-
Specify the auto-speech recognition service hostname. For example:
-
Specify the language of the audio you want to be transcribed. For example:
-
Enter the API key for your auto-speech recognition service. For example:
-
Set the automatic speech recognition threshold for your auto-speech service as a floating point percentage. This threshold is the accuracy returned by your auto-speech service. For example, 0.6=60%.
In this example, when the auto-speech threshold is set to 0.6, any transcription with 60% accuracy is accepted by the auto-speech service and anything below that is discarded.
-
Set the short audio transcribe limit (in seconds). For example:
-
Specify the timeout limit for short audio transcription processing from the cloud services (in seconds). For example:
com.perforce.p4search.auto-speech.model=GoogleSpeechModel
com.perforce.p4search.auto-speech.host=https://speech.googleapis.com
com.perforce.p4search.auto-speech.lang=en
com.perforce.p4search.auto-speech.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.timeout=1200
Example auto-speech recognition configuration for GoogleSpeechModel:
com.perforce.p4search.auto-speech.model=GoogleSpeechModel
com.perforce.p4search.auto-speech.host=https://speech.googleapis.com
com.perforce.p4search.auto-speech.lang=en
com.perforce.p4search.auto-speech.key=AbcdEFG12345ZXvfe56210QWErtyui123456789
com.perforce.p4search.auto-speech.threshold=0.6
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.timeout=1200
Configure the auto-speech recognition service for WhisperSpeechModel
-
Run Whisper as a service in a Docker container. Here is an example of a Docker container:
-
Once the Docker container is ready, set the auto-speech model to WhisperSpeechModel, for example:
-
Specify the auto-speech recognition service hostname using the Whisper Docker container hostname and port number. For example:
-
(Optional) Whisper has built-in language detection. You can optionally specify the language of your audio and video files. For example:
-
Set the short audio transcribe limit (in seconds). For example:
-
Specify the name of the cloud storage bucket or container where the large speech files are stored. For example:
-
Specify the timeout limit for short audio transcription processing from the cloud services (in seconds). For example:
https://hub.docker.com/r/onerahmet/openai-whisper-asr-webservice
com.perforce.p4search.auto-speech.model=WhisperSpeechModel
com.perforce.p4search.auto-speech.host=http://localhost:9000
com.perforce.p4search.auto-speech.lang=en
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.bucket=cloud_storage_bucket_name
com.perforce.p4search.auto-speech.timeout=1200
Example auto-speech recognition configuration for Whisper:
com.perforce.p4search.auto-speech.model=WhisperSpeechModel
com.perforce.p4search.auto-speech.host=http://localhost:9000
com.perforce.p4search.auto-speech.lang=en
com.perforce.p4search.auto-speech.short-audio=60
com.perforce.p4search.auto-speech.timeout=1200
Rendering configuration
Default configuration:
com.perforce.p4search.render.service=
com.perforce.p4search.render.host=
com.perforce.p4search.render.key=
com.perforce.p4search.render.model=
Set the render service
Set the render service implementation you want P4 Search to use to render images. Defaults to empty. For example:
com.perforce.p4search.render.service=LocalRenderService
Set the rendering host
Deprecated.
Set the rendering API key
Set the Rendering service API security key for use with AWSRenderService. The LocalRenderService uses the X-Auth-Token configured in Set the index token.
com.perforce.p4search.render.key=Rendering service API security key
Set 3D model type for rendering service
Set the 3D model type for rendering service to GLB, for example:
com.perforce.p4search.render.model=GLB
Check service status
To check the status of your P4 Search service, navigate to the status page using the connection details you set for the P4 Search service during the installation.
For example:
http://myhelixsearch.mydomain.com:1601/p4search/settings/status
Service status page fails to open
The P4 Search service requires other services to be available. If any of the required services are not available, the service status page URL will return a 404 error with the following message:
Endpoint not mapped: GET /p4search/settings/status
To determine the cause of the failure, check the P4 Search service log file. The default log file is:
<search install dir>/log/p4search.log
Correct the cause of the failure. You might need to update the etc/config.properties file and restart the P4 Search service to correct the problem.